Chromium Code Reviews| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 109 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, GetAccountsFromCookieFailure); | 109 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, GetAccountsFromCookieFailure); |
| 110 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, ValidateAccountsFromTokens); | 110 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, ValidateAccountsFromTokens); |
| 111 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, | 111 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, |
| 112 ValidateAccountsFromTokensFailedUserInfo); | 112 ValidateAccountsFromTokensFailedUserInfo); |
| 113 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, | 113 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, |
| 114 ValidateAccountsFromTokensFailedTokenRequest); | 114 ValidateAccountsFromTokensFailedTokenRequest); |
| 115 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileNoop); | 115 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileNoop); |
| 116 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileNoopWithDots); | 116 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileNoopWithDots); |
| 117 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileNoopMultiple); | 117 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileNoopMultiple); |
| 118 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileAddToCookie); | 118 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileAddToCookie); |
| 119 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, | |
| 120 StartReconcileAddToCookieTwice); | |
| 119 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileAddToChrome); | 121 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileAddToChrome); |
| 120 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileBadPrimary); | 122 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileBadPrimary); |
| 121 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileOnlyOnce); | 123 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileOnlyOnce); |
| 122 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, | 124 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, |
| 123 StartReconcileWithSessionInfoExpiredDefault); | 125 StartReconcileWithSessionInfoExpiredDefault); |
| 124 | 126 |
| 125 // Register and unregister with dependent services. | 127 // Register and unregister with dependent services. |
| 126 void RegisterForCookieChanges(); | 128 void RegisterForCookieChanges(); |
| 127 void UnregisterForCookieChanges(); | 129 void UnregisterForCookieChanges(); |
| 128 void RegisterWithSigninManager(); | 130 void RegisterWithSigninManager(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 160 void HandleSuccessfulAccountIdCheck(const std::string& account_id); | 162 void HandleSuccessfulAccountIdCheck(const std::string& account_id); |
| 161 void HandleFailedAccountIdCheck(const std::string& account_id); | 163 void HandleFailedAccountIdCheck(const std::string& account_id); |
| 162 void HandleRefreshTokenFetched(const std::string& account_id, | 164 void HandleRefreshTokenFetched(const std::string& account_id, |
| 163 const std::string& refresh_token); | 165 const std::string& refresh_token); |
| 164 | 166 |
| 165 void GetAccountsFromCookie(GetAccountsFromCookieCallback callback); | 167 void GetAccountsFromCookie(GetAccountsFromCookieCallback callback); |
| 166 void ContinueReconcileActionAfterGetGaiaAccounts( | 168 void ContinueReconcileActionAfterGetGaiaAccounts( |
| 167 const GoogleServiceAuthError& error, | 169 const GoogleServiceAuthError& error, |
| 168 const std::vector<std::pair<std::string, bool> >& accounts); | 170 const std::vector<std::pair<std::string, bool> >& accounts); |
| 169 void ValidateAccountsFromTokenService(); | 171 void ValidateAccountsFromTokenService(); |
| 172 void MarkAccountAsAddedToCookie(const std::string& account_id); | |
| 173 void MarkAccountAsAddedToChrome(const std::string& account_id); | |
|
Alexei Svitkine (slow)
2014/06/12 17:09:15
Is there a reason none of these methods have comme
Mike Lerman
2014/06/12 18:12:16
Added comments for my new methods. I'm not confide
| |
| 170 | 174 |
| 171 void OnCookieChanged(const net::CanonicalCookie* cookie); | 175 void OnCookieChanged(const net::CanonicalCookie* cookie); |
| 172 | 176 |
| 173 // Overriden from GaiaAuthConsumer. | 177 // Overriden from GaiaAuthConsumer. |
| 174 virtual void OnListAccountsSuccess(const std::string& data) OVERRIDE; | 178 virtual void OnListAccountsSuccess(const std::string& data) OVERRIDE; |
| 175 virtual void OnListAccountsFailure(const GoogleServiceAuthError& error) | 179 virtual void OnListAccountsFailure(const GoogleServiceAuthError& error) |
| 176 OVERRIDE; | 180 OVERRIDE; |
| 177 | 181 |
| 178 // Overriden from MergeSessionHelper::Observer. | 182 // Overriden from MergeSessionHelper::Observer. |
| 179 virtual void MergeSessionCompleted(const std::string& account_id, | 183 virtual void MergeSessionCompleted(const std::string& account_id, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 239 EmailSet invalid_chrome_accounts_; | 243 EmailSet invalid_chrome_accounts_; |
| 240 std::vector<std::string> add_to_cookie_; | 244 std::vector<std::string> add_to_cookie_; |
| 241 std::vector<std::pair<std::string, int> > add_to_chrome_; | 245 std::vector<std::pair<std::string, int> > add_to_chrome_; |
| 242 | 246 |
| 243 std::deque<GetAccountsFromCookieCallback> get_gaia_accounts_callbacks_; | 247 std::deque<GetAccountsFromCookieCallback> get_gaia_accounts_callbacks_; |
| 244 | 248 |
| 245 DISALLOW_COPY_AND_ASSIGN(AccountReconcilor); | 249 DISALLOW_COPY_AND_ASSIGN(AccountReconcilor); |
| 246 }; | 250 }; |
| 247 | 251 |
| 248 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_ | 252 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_ |
| OLD | NEW |