Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: components/signin/core/browser/account_reconcilor.h

Issue 309843002: Improve UMA tests; improve no-op reconcilor; new reconcilor test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, GetAccountsFromCookieFailure); 114 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, GetAccountsFromCookieFailure);
115 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, ValidateAccountsFromTokens); 115 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, ValidateAccountsFromTokens);
116 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, 116 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest,
117 ValidateAccountsFromTokensFailedUserInfo); 117 ValidateAccountsFromTokensFailedUserInfo);
118 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, 118 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest,
119 ValidateAccountsFromTokensFailedTokenRequest); 119 ValidateAccountsFromTokensFailedTokenRequest);
120 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileNoop); 120 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileNoop);
121 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileNoopWithDots); 121 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileNoopWithDots);
122 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileNoopMultiple); 122 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileNoopMultiple);
123 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileAddToCookie); 123 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileAddToCookie);
124 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest,
125 StartReconcileAddToCookieTwice);
124 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileAddToChrome); 126 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileAddToChrome);
125 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileBadPrimary); 127 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileBadPrimary);
126 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileOnlyOnce); 128 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileOnlyOnce);
127 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, 129 FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest,
128 StartReconcileWithSessionInfoExpiredDefault); 130 StartReconcileWithSessionInfoExpiredDefault);
129 131
130 // Register and unregister with dependent services. 132 // Register and unregister with dependent services.
131 void RegisterForCookieChanges(); 133 void RegisterForCookieChanges();
132 void UnregisterForCookieChanges(); 134 void UnregisterForCookieChanges();
133 void RegisterWithSigninManager(); 135 void RegisterWithSigninManager();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 void HandleSuccessfulAccountIdCheck(const std::string& account_id); 167 void HandleSuccessfulAccountIdCheck(const std::string& account_id);
166 void HandleFailedAccountIdCheck(const std::string& account_id); 168 void HandleFailedAccountIdCheck(const std::string& account_id);
167 void HandleRefreshTokenFetched(const std::string& account_id, 169 void HandleRefreshTokenFetched(const std::string& account_id,
168 const std::string& refresh_token); 170 const std::string& refresh_token);
169 171
170 void GetAccountsFromCookie(GetAccountsFromCookieCallback callback); 172 void GetAccountsFromCookie(GetAccountsFromCookieCallback callback);
171 void ContinueReconcileActionAfterGetGaiaAccounts( 173 void ContinueReconcileActionAfterGetGaiaAccounts(
172 const GoogleServiceAuthError& error, 174 const GoogleServiceAuthError& error,
173 const std::vector<std::pair<std::string, bool> >& accounts); 175 const std::vector<std::pair<std::string, bool> >& accounts);
174 void ValidateAccountsFromTokenService(); 176 void ValidateAccountsFromTokenService();
177 // Note internally that this |account_id| is added to the cookie jar.
178 void MarkAccountAsAddedToCookie(const std::string& account_id);
179 // Note internally that this |account_id| is added to the token service.
180 void MarkAccountAsAddedToChrome(const std::string& account_id);
175 181
176 void OnCookieChanged(const net::CanonicalCookie* cookie); 182 void OnCookieChanged(const net::CanonicalCookie* cookie);
177 183
178 // Overriden from GaiaAuthConsumer. 184 // Overriden from GaiaAuthConsumer.
179 virtual void OnListAccountsSuccess(const std::string& data) OVERRIDE; 185 virtual void OnListAccountsSuccess(const std::string& data) OVERRIDE;
180 virtual void OnListAccountsFailure(const GoogleServiceAuthError& error) 186 virtual void OnListAccountsFailure(const GoogleServiceAuthError& error)
181 OVERRIDE; 187 OVERRIDE;
182 188
183 // Overriden from MergeSessionHelper::Observer. 189 // Overriden from MergeSessionHelper::Observer.
184 virtual void MergeSessionCompleted(const std::string& account_id, 190 virtual void MergeSessionCompleted(const std::string& account_id,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 EmailSet invalid_chrome_accounts_; 250 EmailSet invalid_chrome_accounts_;
245 std::vector<std::string> add_to_cookie_; 251 std::vector<std::string> add_to_cookie_;
246 std::vector<std::pair<std::string, int> > add_to_chrome_; 252 std::vector<std::pair<std::string, int> > add_to_chrome_;
247 253
248 std::deque<GetAccountsFromCookieCallback> get_gaia_accounts_callbacks_; 254 std::deque<GetAccountsFromCookieCallback> get_gaia_accounts_callbacks_;
249 255
250 DISALLOW_COPY_AND_ASSIGN(AccountReconcilor); 256 DISALLOW_COPY_AND_ASSIGN(AccountReconcilor);
251 }; 257 };
252 258
253 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_ 259 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_
OLDNEW
« no previous file with comments | « chrome/test/base/uma_histogram_helper.cc ('k') | components/signin/core/browser/account_reconcilor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698