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

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

Issue 298753009: Clear list of pending /ListAccount callsbacks when shutting down or when (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 StartReconcile(); 230 StartReconcile();
231 } 231 }
232 } 232 }
233 } 233 }
234 234
235 void AccountReconcilor::Shutdown() { 235 void AccountReconcilor::Shutdown() {
236 VLOG(1) << "AccountReconcilor::Shutdown"; 236 VLOG(1) << "AccountReconcilor::Shutdown";
237 merge_session_helper_.CancelAll(); 237 merge_session_helper_.CancelAll();
238 merge_session_helper_.RemoveObserver(this); 238 merge_session_helper_.RemoveObserver(this);
239 gaia_fetcher_.reset(); 239 gaia_fetcher_.reset();
240 get_gaia_accounts_callbacks_.clear();
240 DeleteFetchers(); 241 DeleteFetchers();
241 UnregisterWithSigninManager(); 242 UnregisterWithSigninManager();
242 UnregisterWithTokenService(); 243 UnregisterWithTokenService();
243 UnregisterForCookieChanges(); 244 UnregisterForCookieChanges();
244 } 245 }
245 246
246 void AccountReconcilor::AddMergeSessionObserver( 247 void AccountReconcilor::AddMergeSessionObserver(
247 MergeSessionHelper::Observer* observer) { 248 MergeSessionHelper::Observer* observer) {
248 merge_session_helper_.AddObserver(observer); 249 merge_session_helper_.AddObserver(observer);
249 } 250 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 void AccountReconcilor::GoogleSigninSucceeded(const std::string& username, 343 void AccountReconcilor::GoogleSigninSucceeded(const std::string& username,
343 const std::string& password) { 344 const std::string& password) {
344 VLOG(1) << "AccountReconcilor::GoogleSigninSucceeded: signed in"; 345 VLOG(1) << "AccountReconcilor::GoogleSigninSucceeded: signed in";
345 RegisterForCookieChanges(); 346 RegisterForCookieChanges();
346 RegisterWithTokenService(); 347 RegisterWithTokenService();
347 } 348 }
348 349
349 void AccountReconcilor::GoogleSignedOut(const std::string& username) { 350 void AccountReconcilor::GoogleSignedOut(const std::string& username) {
350 VLOG(1) << "AccountReconcilor::GoogleSignedOut: signed out"; 351 VLOG(1) << "AccountReconcilor::GoogleSignedOut: signed out";
351 gaia_fetcher_.reset(); 352 gaia_fetcher_.reset();
353 get_gaia_accounts_callbacks_.clear();
352 AbortReconcile(); 354 AbortReconcile();
353 UnregisterWithTokenService(); 355 UnregisterWithTokenService();
354 UnregisterForCookieChanges(); 356 UnregisterForCookieChanges();
355 PerformLogoutAllAccountsAction(); 357 PerformLogoutAllAccountsAction();
356 } 358 }
357 359
358 void AccountReconcilor::PerformMergeAction(const std::string& account_id) { 360 void AccountReconcilor::PerformMergeAction(const std::string& account_id) {
359 VLOG(1) << "AccountReconcilor::PerformMergeAction: " << account_id; 361 VLOG(1) << "AccountReconcilor::PerformMergeAction: " << account_id;
360 merge_session_helper_.LogIn(account_id); 362 merge_session_helper_.LogIn(account_id);
361 } 363 }
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 i != add_to_chrome_.end(); 727 i != add_to_chrome_.end();
726 ++i) { 728 ++i) {
727 if (gaia::AreEmailsSame(account_id, i->first)) { 729 if (gaia::AreEmailsSame(account_id, i->first)) {
728 add_to_chrome_.erase(i); 730 add_to_chrome_.erase(i);
729 break; 731 break;
730 } 732 }
731 } 733 }
732 734
733 CalculateIfReconcileIsDone(); 735 CalculateIfReconcileIsDone();
734 } 736 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698