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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 void CalculateIfReconcileIsDone(); | 128 void CalculateIfReconcileIsDone(); |
129 void ScheduleStartReconcileIfChromeAccountsChanged(); | 129 void ScheduleStartReconcileIfChromeAccountsChanged(); |
130 | 130 |
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, bool removed); |
139 | 139 |
140 // Overriden from GaiaAuthConsumer. | 140 // Overriden from GaiaAuthConsumer. |
141 void OnListAccountsSuccess(const std::string& data) override; | 141 void OnListAccountsSuccess(const std::string& data) override; |
142 void OnListAccountsFailure(const GoogleServiceAuthError& error) override; | 142 void OnListAccountsFailure(const GoogleServiceAuthError& error) override; |
143 | 143 |
144 // Overriden from MergeSessionHelper::Observer. | 144 // Overriden from MergeSessionHelper::Observer. |
145 void MergeSessionCompleted(const std::string& account_id, | 145 void MergeSessionCompleted(const std::string& account_id, |
146 const GoogleServiceAuthError& error) override; | 146 const GoogleServiceAuthError& error) override; |
147 | 147 |
148 // Overriden from OAuth2TokenService::Observer. | 148 // Overriden from OAuth2TokenService::Observer. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 std::vector<std::pair<std::string, bool> > gaia_accounts_; | 187 std::vector<std::pair<std::string, bool> > gaia_accounts_; |
188 | 188 |
189 // Used during reconcile action. | 189 // Used during reconcile action. |
190 // These members are used to validate the tokens in OAuth2TokenService. | 190 // These members are used to validate the tokens in OAuth2TokenService. |
191 std::string primary_account_; | 191 std::string primary_account_; |
192 std::vector<std::string> chrome_accounts_; | 192 std::vector<std::string> chrome_accounts_; |
193 std::vector<std::string> add_to_cookie_; | 193 std::vector<std::string> add_to_cookie_; |
194 | 194 |
195 std::deque<GetAccountsFromCookieCallback> get_gaia_accounts_callbacks_; | 195 std::deque<GetAccountsFromCookieCallback> get_gaia_accounts_callbacks_; |
196 | 196 |
197 scoped_ptr<SigninClient::CookieChangedCallbackList::Subscription> | 197 scoped_ptr<SigninClient::CookieChangedSubscription> |
198 cookie_changed_subscription_; | 198 cookie_changed_subscription_; |
199 | 199 |
200 DISALLOW_COPY_AND_ASSIGN(AccountReconcilor); | 200 DISALLOW_COPY_AND_ASSIGN(AccountReconcilor); |
201 }; | 201 }; |
202 | 202 |
203 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_ | 203 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_ |
OLD | NEW |