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); |
143 | 146 |
144 // Used to remove an account from chrome and the cookie jar. | 147 // Used to remove an account from chrome and the cookie jar. |
145 virtual void StartRemoveAction(const std::string& account_id); | 148 virtual void PerformStartRemoveAction(const std::string& account_id); |
146 virtual void FinishRemoveAction( | 149 virtual void PerformFinishRemoveAction( |
147 const std::string& account_id, | 150 const std::string& account_id, |
148 const GoogleServiceAuthError& error, | 151 const GoogleServiceAuthError& error, |
149 const std::vector<std::pair<std::string, bool> >& accounts); | 152 const std::vector<std::pair<std::string, bool> >& accounts); |
150 | 153 |
151 // Used during periodic reconciliation. | 154 // Used during periodic reconciliation. |
152 void StartReconcile(); | 155 void StartReconcile(); |
153 void FinishReconcile(); | 156 void FinishReconcile(); |
154 void AbortReconcile(); | 157 void AbortReconcile(); |
155 void CalculateIfReconcileIsDone(); | 158 void CalculateIfReconcileIsDone(); |
156 void ScheduleStartReconcileIfChromeAccountsChanged(); | 159 void ScheduleStartReconcileIfChromeAccountsChanged(); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 EmailSet invalid_chrome_accounts_; | 239 EmailSet invalid_chrome_accounts_; |
237 std::vector<std::string> add_to_cookie_; | 240 std::vector<std::string> add_to_cookie_; |
238 std::vector<std::pair<std::string, int> > add_to_chrome_; | 241 std::vector<std::pair<std::string, int> > add_to_chrome_; |
239 | 242 |
240 std::deque<GetAccountsFromCookieCallback> get_gaia_accounts_callbacks_; | 243 std::deque<GetAccountsFromCookieCallback> get_gaia_accounts_callbacks_; |
241 | 244 |
242 DISALLOW_COPY_AND_ASSIGN(AccountReconcilor); | 245 DISALLOW_COPY_AND_ASSIGN(AccountReconcilor); |
243 }; | 246 }; |
244 | 247 |
245 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_ | 248 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_ |
OLD | NEW |