OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_ | 4 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_ |
5 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_ | 5 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_ |
6 | 6 |
7 #include <deque> | 7 #include <deque> |
8 #include <functional> | 8 #include <functional> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 virtual ~AccountReconcilor(); | 44 virtual ~AccountReconcilor(); |
45 | 45 |
46 void Initialize(bool start_reconcile_if_tokens_available); | 46 void Initialize(bool start_reconcile_if_tokens_available); |
47 | 47 |
48 // Signal that the status of the new_profile_management flag has changed. | 48 // Signal that the status of the new_profile_management flag has changed. |
49 // Pass the new status as an explicit parameter since disabling the flag | 49 // Pass the new status as an explicit parameter since disabling the flag |
50 // doesn't remove it from the CommandLine::ForCurrentProcess(). | 50 // doesn't remove it from the CommandLine::ForCurrentProcess(). |
51 void OnNewProfileManagementFlagChanged(bool new_flag_status); | 51 void OnNewProfileManagementFlagChanged(bool new_flag_status); |
52 | 52 |
53 // KeyedService implementation. | 53 // KeyedService implementation. |
54 virtual void Shutdown() OVERRIDE; | 54 virtual void Shutdown() override; |
55 | 55 |
56 // Add or remove observers for the merge session notification. | 56 // Add or remove observers for the merge session notification. |
57 void AddMergeSessionObserver(MergeSessionHelper::Observer* observer); | 57 void AddMergeSessionObserver(MergeSessionHelper::Observer* observer); |
58 void RemoveMergeSessionObserver(MergeSessionHelper::Observer* observer); | 58 void RemoveMergeSessionObserver(MergeSessionHelper::Observer* observer); |
59 | 59 |
60 ProfileOAuth2TokenService* token_service() { return token_service_; } | 60 ProfileOAuth2TokenService* token_service() { return token_service_; } |
61 SigninClient* client() { return client_; } | 61 SigninClient* client() { return client_; } |
62 | 62 |
63 protected: | 63 protected: |
64 // Used during GetAccountsFromCookie. | 64 // Used during GetAccountsFromCookie. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 void ContinueReconcileActionAfterGetGaiaAccounts( | 131 void ContinueReconcileActionAfterGetGaiaAccounts( |
132 const GoogleServiceAuthError& error, | 132 const GoogleServiceAuthError& error, |
133 const std::vector<std::pair<std::string, bool> >& accounts); | 133 const std::vector<std::pair<std::string, bool> >& accounts); |
134 void ValidateAccountsFromTokenService(); | 134 void ValidateAccountsFromTokenService(); |
135 // Note internally that this |account_id| is added to the cookie jar. | 135 // Note internally that this |account_id| is added to the cookie jar. |
136 bool MarkAccountAsAddedToCookie(const std::string& account_id); | 136 bool MarkAccountAsAddedToCookie(const std::string& account_id); |
137 | 137 |
138 void OnCookieChanged(const net::CanonicalCookie* cookie); | 138 void OnCookieChanged(const net::CanonicalCookie* cookie); |
139 | 139 |
140 // Overriden from GaiaAuthConsumer. | 140 // Overriden from GaiaAuthConsumer. |
141 virtual void OnListAccountsSuccess(const std::string& data) OVERRIDE; | 141 virtual void OnListAccountsSuccess(const std::string& data) override; |
142 virtual void OnListAccountsFailure(const GoogleServiceAuthError& error) | 142 virtual void OnListAccountsFailure(const GoogleServiceAuthError& error) |
143 OVERRIDE; | 143 override; |
144 | 144 |
145 // Overriden from MergeSessionHelper::Observer. | 145 // Overriden from MergeSessionHelper::Observer. |
146 virtual void MergeSessionCompleted(const std::string& account_id, | 146 virtual void MergeSessionCompleted(const std::string& account_id, |
147 const GoogleServiceAuthError& error) | 147 const GoogleServiceAuthError& error) |
148 OVERRIDE; | 148 override; |
149 | 149 |
150 // Overriden from OAuth2TokenService::Observer. | 150 // Overriden from OAuth2TokenService::Observer. |
151 virtual void OnEndBatchChanges() OVERRIDE; | 151 virtual void OnEndBatchChanges() override; |
152 | 152 |
153 // Overriden from SigninManagerBase::Observer. | 153 // Overriden from SigninManagerBase::Observer. |
154 virtual void GoogleSigninSucceeded(const std::string& account_id, | 154 virtual void GoogleSigninSucceeded(const std::string& account_id, |
155 const std::string& username, | 155 const std::string& username, |
156 const std::string& password) OVERRIDE; | 156 const std::string& password) override; |
157 virtual void GoogleSignedOut(const std::string& account_id, | 157 virtual void GoogleSignedOut(const std::string& account_id, |
158 const std::string& username) OVERRIDE; | 158 const std::string& username) override; |
159 | 159 |
160 void MayBeDoNextListAccounts(); | 160 void MayBeDoNextListAccounts(); |
161 | 161 |
162 // The ProfileOAuth2TokenService associated with this reconcilor. | 162 // The ProfileOAuth2TokenService associated with this reconcilor. |
163 ProfileOAuth2TokenService* token_service_; | 163 ProfileOAuth2TokenService* token_service_; |
164 | 164 |
165 // The SigninManager associated with this reconcilor. | 165 // The SigninManager associated with this reconcilor. |
166 SigninManagerBase* signin_manager_; | 166 SigninManagerBase* signin_manager_; |
167 | 167 |
168 // The SigninClient associated with this reconcilor. | 168 // The SigninClient associated with this reconcilor. |
(...skipping 27 matching lines...) Expand all Loading... |
196 | 196 |
197 std::deque<GetAccountsFromCookieCallback> get_gaia_accounts_callbacks_; | 197 std::deque<GetAccountsFromCookieCallback> get_gaia_accounts_callbacks_; |
198 | 198 |
199 scoped_ptr<SigninClient::CookieChangedCallbackList::Subscription> | 199 scoped_ptr<SigninClient::CookieChangedCallbackList::Subscription> |
200 cookie_changed_subscription_; | 200 cookie_changed_subscription_; |
201 | 201 |
202 DISALLOW_COPY_AND_ASSIGN(AccountReconcilor); | 202 DISALLOW_COPY_AND_ASSIGN(AccountReconcilor); |
203 }; | 203 }; |
204 | 204 |
205 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_ | 205 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_ |
OLD | NEW |