Chromium Code Reviews| Index: chrome/browser/signin/account_reconcilor.h |
| diff --git a/chrome/browser/signin/account_reconcilor.h b/chrome/browser/signin/account_reconcilor.h |
| index 0773ef5ad95a9c1ad9bc6d60607aa32f7c5073e9..44020121f7058c77fcd028e9da7c7bddb491a5df 100644 |
| --- a/chrome/browser/signin/account_reconcilor.h |
| +++ b/chrome/browser/signin/account_reconcilor.h |
| @@ -5,6 +5,9 @@ |
| #define CHROME_BROWSER_SIGNIN_ACCOUNT_RECONCILOR_H_ |
| #include <deque> |
| +#include <string> |
| +#include <utility> |
| +#include <vector> |
| #include "base/basictypes.h" |
| #include "base/callback_forward.h" |
| @@ -56,10 +59,12 @@ class AccountReconcilor : public BrowserContextKeyedService, |
| bool AreAllRefreshTokensChecked() const; |
| - const std::vector<std::string>& GetGaiaAccountsForTesting() const { |
| + const std::vector<std::pair<std::string, bool> >& |
| + GetGaiaAccountsForTesting() const { |
| return gaia_accounts_; |
| } |
| + private: |
| const std::set<std::string>& GetValidChromeAccountsForTesting() const { |
| return valid_chrome_accounts_; |
| } |
| @@ -68,12 +73,12 @@ class AccountReconcilor : public BrowserContextKeyedService, |
| return invalid_chrome_accounts_; |
| } |
| - private: |
| // Used during GetAccountsFromCookie. |
| // Stores a callback for the next action to perform. |
| typedef base::Callback<void( |
| const GoogleServiceAuthError& error, |
| - const std::vector<std::string>&)> GetAccountsFromCookieCallback; |
| + const std::vector<std::pair<std::string, bool> >&)> |
| + GetAccountsFromCookieCallback; |
| friend class AccountReconcilorTest; |
| FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, GetAccountsFromCookieSuccess); |
| @@ -89,6 +94,8 @@ class AccountReconcilor : public BrowserContextKeyedService, |
| FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileAddToChrome); |
| FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileBadPrimary); |
| FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, StartReconcileOnlyOnce); |
| + FRIEND_TEST_ALL_PREFIXES(AccountReconcilorTest, |
| + StartReconcileWithSessionInfoExpiredDefault); |
| class RefreshTokenFetcher; |
| class UserIdFetcher; |
| @@ -122,7 +129,7 @@ class AccountReconcilor : public BrowserContextKeyedService, |
| virtual void FinishRemoveAction( |
| const std::string& account_id, |
| const GoogleServiceAuthError& error, |
| - const std::vector<std::string>& accounts); |
| + const std::vector<std::pair<std::string, bool> >& accounts); |
| // Used during periodic reconciliation. |
| void StartReconcile(); |
| @@ -137,7 +144,7 @@ class AccountReconcilor : public BrowserContextKeyedService, |
| void GetAccountsFromCookie(GetAccountsFromCookieCallback callback); |
| void ContinueReconcileActionAfterGetGaiaAccounts( |
| const GoogleServiceAuthError& error, |
| - const std::vector<std::string>& accounts); |
| + const std::vector<std::pair<std::string, bool> >& accounts); |
| void ValidateAccountsFromTokenService(); |
| void OnCookieChanged(ChromeCookieDetails* details); |
| @@ -191,7 +198,7 @@ class AccountReconcilor : public BrowserContextKeyedService, |
| // Used during reconcile action. |
| // These members are used used to validate the gaia cookie. |
| bool are_gaia_accounts_set_; |
|
acleung1
2014/02/18 21:00:24
Can you document on what the bool represent here?
Roger Tawa OOO till Jul 10th
2014/02/19 22:57:01
Added docs.
|
| - std::vector<std::string> gaia_accounts_; |
| + std::vector<std::pair<std::string, bool> > gaia_accounts_; |
| // Used during reconcile action. |
| // These members are used to validate the tokens in OAuth2TokenService. |