1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h"
9 ChromeIdentityService::ChromeIdentityService() {}
11 ChromeIdentityService::~ChromeIdentityService() {}
13 bool ChromeIdentityService::IsValidIdentity(ChromeIdentity* identity) const {
17 ChromeIdentity* ChromeIdentityService::GetIdentityWithEmail(
18 const std::string& email) const {
22 ChromeIdentity* ChromeIdentityService::GetIdentityWithGaiaID(
23 const std::string& gaia_id) const {
27 std::vector<std::string>
28 ChromeIdentityService::GetCanonicalizeEmailsForAllIdentities() const {
29 return std::vector<std::string>();
32 bool ChromeIdentityService::HasIdentities() const {
36 NSArray* ChromeIdentityService::GetAllIdentities() const {
40 NSArray* ChromeIdentityService::GetAllIdentitiesSortedForDisplay() const {
44 void ChromeIdentityService::ForgetIdentity(ChromeIdentity* identity,
45 ForgetIdentityCallback callback) {}
47 void ChromeIdentityService::GetAccessToken(
48 ChromeIdentity* identity,
49 const std::set<std::string>& scopes,
50 const AccessTokenCallback& callback) {}
52 void ChromeIdentityService::GetAccessToken(
53 ChromeIdentity* identity,
54 const std::string& client_id,
55 const std::string& client_secret,
56 const std::set<std::string>& scopes,
57 const AccessTokenCallback& callback) {}
59 void ChromeIdentityService::SigninIdentity(ChromeIdentity* identity,
60 SigninIdentityCallback callback) {}
62 void ChromeIdentityService::GetAvatarForIdentity(ChromeIdentity* identity,
63 GetAvatarCallback callback) {}
65 UIImage* ChromeIdentityService::GetCachedAvatarForIdentity(
66 ChromeIdentity* identity) {
70 void ChromeIdentityService::AddObserver(Observer* observer) {
71 observer_list_.AddObserver(observer);
74 void ChromeIdentityService::RemoveObserver(Observer* observer) {
75 observer_list_.RemoveObserver(observer);
78 void ChromeIdentityService::FireIdentityListChanged() {
79 FOR_EACH_OBSERVER(Observer, observer_list_, OnIdentityListChanged());
82 void ChromeIdentityService::FireAccessTokenRefreshFailed(
83 ChromeIdentity* identity,
84 AccessTokenErrorReason error) {
85 FOR_EACH_OBSERVER(Observer, observer_list_,
86 OnAccessTokenRefreshFailed(identity, error));
89 void ChromeIdentityService::FireProfileDidUpdate(ChromeIdentity* identity) {
90 FOR_EACH_OBSERVER(Observer, observer_list_, OnProfileUpdate(identity));