| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 bool IsProfileConnected(); | 133 bool IsProfileConnected(); |
| 134 | 134 |
| 135 void DeleteFetchers(); | 135 void DeleteFetchers(); |
| 136 | 136 |
| 137 // All actions with side effects. Virtual so that they can be overridden | 137 // All actions with side effects. Virtual so that they can be overridden |
| 138 // in tests. | 138 // in tests. |
| 139 virtual void PerformMergeAction(const std::string& account_id); | 139 virtual void PerformMergeAction(const std::string& account_id); |
| 140 virtual void PerformAddToChromeAction(const std::string& account_id, | 140 virtual void PerformAddToChromeAction(const std::string& account_id, |
| 141 int session_index); | 141 int session_index); |
| 142 virtual void PerformLogoutAllAccountsAction(); | 142 virtual void PerformLogoutAllAccountsAction(); |
| 143 virtual void PerformAddAccountToTokenService( | |
| 144 const std::string& account_id, | |
| 145 const std::string& refresh_token); | |
| 146 | 143 |
| 147 // Used to remove an account from chrome and the cookie jar. | 144 // Used to remove an account from chrome and the cookie jar. |
| 148 virtual void PerformStartRemoveAction(const std::string& account_id); | 145 virtual void StartRemoveAction(const std::string& account_id); |
| 149 virtual void PerformFinishRemoveAction( | 146 virtual void FinishRemoveAction( |
| 150 const std::string& account_id, | 147 const std::string& account_id, |
| 151 const GoogleServiceAuthError& error, | 148 const GoogleServiceAuthError& error, |
| 152 const std::vector<std::pair<std::string, bool> >& accounts); | 149 const std::vector<std::pair<std::string, bool> >& accounts); |
| 153 | 150 |
| 154 // Used during periodic reconciliation. | 151 // Used during periodic reconciliation. |
| 155 void StartReconcile(); | 152 void StartReconcile(); |
| 156 void FinishReconcile(); | 153 void FinishReconcile(); |
| 157 void AbortReconcile(); | 154 void AbortReconcile(); |
| 158 void CalculateIfReconcileIsDone(); | 155 void CalculateIfReconcileIsDone(); |
| 159 void ScheduleStartReconcileIfChromeAccountsChanged(); | 156 void ScheduleStartReconcileIfChromeAccountsChanged(); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 EmailSet invalid_chrome_accounts_; | 236 EmailSet invalid_chrome_accounts_; |
| 240 std::vector<std::string> add_to_cookie_; | 237 std::vector<std::string> add_to_cookie_; |
| 241 std::vector<std::pair<std::string, int> > add_to_chrome_; | 238 std::vector<std::pair<std::string, int> > add_to_chrome_; |
| 242 | 239 |
| 243 std::deque<GetAccountsFromCookieCallback> get_gaia_accounts_callbacks_; | 240 std::deque<GetAccountsFromCookieCallback> get_gaia_accounts_callbacks_; |
| 244 | 241 |
| 245 DISALLOW_COPY_AND_ASSIGN(AccountReconcilor); | 242 DISALLOW_COPY_AND_ASSIGN(AccountReconcilor); |
| 246 }; | 243 }; |
| 247 | 244 |
| 248 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_ | 245 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_ |
| OLD | NEW |