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

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

Issue 502343002: Add account_id to signin manager notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@isauth
Patch Set: Fix android trybots Created 6 years, 3 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
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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 void AccountReconcilor::OnRefreshTokenRevoked(const std::string& account_id) { 335 void AccountReconcilor::OnRefreshTokenRevoked(const std::string& account_id) {
336 VLOG(1) << "AccountReconcilor::OnRefreshTokenRevoked: " << account_id; 336 VLOG(1) << "AccountReconcilor::OnRefreshTokenRevoked: " << account_id;
337 PerformStartRemoveAction(account_id); 337 PerformStartRemoveAction(account_id);
338 } 338 }
339 339
340 void AccountReconcilor::OnEndBatchChanges() { 340 void AccountReconcilor::OnEndBatchChanges() {
341 VLOG(1) << "AccountReconcilor::OnEndBatchChanges"; 341 VLOG(1) << "AccountReconcilor::OnEndBatchChanges";
342 StartReconcile(); 342 StartReconcile();
343 } 343 }
344 344
345 void AccountReconcilor::GoogleSigninSucceeded(const std::string& username, 345 void AccountReconcilor::GoogleSigninSucceeded(const std::string& account_id,
346 const std::string& username,
346 const std::string& password) { 347 const std::string& password) {
347 VLOG(1) << "AccountReconcilor::GoogleSigninSucceeded: signed in"; 348 VLOG(1) << "AccountReconcilor::GoogleSigninSucceeded: signed in";
348 RegisterForCookieChanges(); 349 RegisterForCookieChanges();
349 RegisterWithTokenService(); 350 RegisterWithTokenService();
350 } 351 }
351 352
352 void AccountReconcilor::GoogleSignedOut(const std::string& username) { 353 void AccountReconcilor::GoogleSignedOut(const std::string& account_id,
354 const std::string& username) {
353 VLOG(1) << "AccountReconcilor::GoogleSignedOut: signed out"; 355 VLOG(1) << "AccountReconcilor::GoogleSignedOut: signed out";
354 gaia_fetcher_.reset(); 356 gaia_fetcher_.reset();
355 get_gaia_accounts_callbacks_.clear(); 357 get_gaia_accounts_callbacks_.clear();
356 AbortReconcile(); 358 AbortReconcile();
357 UnregisterWithTokenService(); 359 UnregisterWithTokenService();
358 UnregisterForCookieChanges(); 360 UnregisterForCookieChanges();
359 PerformLogoutAllAccountsAction(); 361 PerformLogoutAllAccountsAction();
360 } 362 }
361 363
362 void AccountReconcilor::PerformMergeAction(const std::string& account_id) { 364 void AccountReconcilor::PerformMergeAction(const std::string& account_id) {
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 799
798 void AccountReconcilor::HandleRefreshTokenFetched( 800 void AccountReconcilor::HandleRefreshTokenFetched(
799 const std::string& account_id, 801 const std::string& account_id,
800 const std::string& refresh_token) { 802 const std::string& refresh_token) {
801 if (!refresh_token.empty()) 803 if (!refresh_token.empty())
802 PerformAddAccountToTokenService(account_id, refresh_token); 804 PerformAddAccountToTokenService(account_id, refresh_token);
803 805
804 MarkAccountAsAddedToChrome(account_id); 806 MarkAccountAsAddedToChrome(account_id);
805 CalculateIfReconcileIsDone(); 807 CalculateIfReconcileIsDone();
806 } 808 }
OLDNEW
« no previous file with comments | « components/signin/core/browser/account_reconcilor.h ('k') | components/signin/core/browser/signin_account_id_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698