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 | 4 |
5 #include "components/signin/core/browser/account_reconcilor.h" | 5 #include "components/signin/core/browser/account_reconcilor.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 | 340 |
341 void AccountReconcilor::GoogleSigninSucceeded(const std::string& username, | 341 void AccountReconcilor::GoogleSigninSucceeded(const std::string& username, |
342 const std::string& password) { | 342 const std::string& password) { |
343 VLOG(1) << "AccountReconcilor::GoogleSigninSucceeded: signed in"; | 343 VLOG(1) << "AccountReconcilor::GoogleSigninSucceeded: signed in"; |
344 RegisterForCookieChanges(); | 344 RegisterForCookieChanges(); |
345 RegisterWithTokenService(); | 345 RegisterWithTokenService(); |
346 } | 346 } |
347 | 347 |
348 void AccountReconcilor::GoogleSignedOut(const std::string& username) { | 348 void AccountReconcilor::GoogleSignedOut(const std::string& username) { |
349 VLOG(1) << "AccountReconcilor::GoogleSignedOut: signed out"; | 349 VLOG(1) << "AccountReconcilor::GoogleSignedOut: signed out"; |
| 350 gaia_fetcher_.reset(); |
| 351 AbortReconcile(); |
350 UnregisterWithTokenService(); | 352 UnregisterWithTokenService(); |
351 UnregisterForCookieChanges(); | 353 UnregisterForCookieChanges(); |
| 354 PerformLogoutAllAccountsAction(); |
352 } | 355 } |
353 | 356 |
354 void AccountReconcilor::PerformMergeAction(const std::string& account_id) { | 357 void AccountReconcilor::PerformMergeAction(const std::string& account_id) { |
355 VLOG(1) << "AccountReconcilor::PerformMergeAction: " << account_id; | 358 VLOG(1) << "AccountReconcilor::PerformMergeAction: " << account_id; |
356 merge_session_helper_.LogIn(account_id); | 359 merge_session_helper_.LogIn(account_id); |
357 } | 360 } |
358 | 361 |
359 void AccountReconcilor::StartRemoveAction(const std::string& account_id) { | 362 void AccountReconcilor::StartRemoveAction(const std::string& account_id) { |
360 VLOG(1) << "AccountReconcilor::StartRemoveAction: " << account_id; | 363 VLOG(1) << "AccountReconcilor::StartRemoveAction: " << account_id; |
361 GetAccountsFromCookie(base::Bind(&AccountReconcilor::FinishRemoveAction, | 364 GetAccountsFromCookie(base::Bind(&AccountReconcilor::FinishRemoveAction, |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 i != add_to_chrome_.end(); | 716 i != add_to_chrome_.end(); |
714 ++i) { | 717 ++i) { |
715 if (gaia::AreEmailsSame(account_id, i->first)) { | 718 if (gaia::AreEmailsSame(account_id, i->first)) { |
716 add_to_chrome_.erase(i); | 719 add_to_chrome_.erase(i); |
717 break; | 720 break; |
718 } | 721 } |
719 } | 722 } |
720 | 723 |
721 CalculateIfReconcileIsDone(); | 724 CalculateIfReconcileIsDone(); |
722 } | 725 } |
OLD | NEW |