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

Unified Diff: chrome/browser/signin/account_reconcilor.cc

Issue 110373007: Delay loading the NTP after sign in until MergeSession has been performed in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/signin/account_reconcilor.cc
diff --git a/chrome/browser/signin/account_reconcilor.cc b/chrome/browser/signin/account_reconcilor.cc
index ed10cbec78b33d35a6db68e26dddf711f6da0b3c..8f94870435fce5843fd60437844986096404427f 100644
--- a/chrome/browser/signin/account_reconcilor.cc
+++ b/chrome/browser/signin/account_reconcilor.cc
@@ -10,7 +10,6 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/net/chrome_cookie_notification_details.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/signin/google_auto_login_helper.h"
#include "chrome/browser/signin/profile_oauth2_token_service.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_manager.h"
@@ -78,9 +77,9 @@ void AccountReconcilor::UserIdFetcher::OnNetworkError(int response_code) {
AccountReconcilor::AccountReconcilor(Profile* profile)
: profile_(profile),
+ merge_session_helper_(profile, NULL),
registered_with_token_service_(false),
- are_gaia_accounts_set_(false),
- requests_(NULL) {
+ are_gaia_accounts_set_(false),requests_(NULL) {
DVLOG(1) << "AccountReconcilor::AccountReconcilor";
RegisterWithSigninManager();
RegisterWithCookieMonster();
@@ -111,6 +110,16 @@ void AccountReconcilor::Shutdown() {
StopPeriodicReconciliation();
}
+void AccountReconcilor::AddMergeSessionObserver(
+ GoogleAutoLoginHelper::Observer* observer) {
+ merge_session_helper_.AddObserver(observer);
+}
+
+void AccountReconcilor::RemoveMergeSessionObserver(
+ GoogleAutoLoginHelper::Observer* observer) {
+ merge_session_helper_.RemoveObserver(observer);
+}
+
void AccountReconcilor::DeleteAccessTokenRequestsAndUserIdFetchers() {
delete[] requests_;
requests_ = NULL;
@@ -236,9 +245,7 @@ void AccountReconcilor::OnRefreshTokenRevoked(const std::string& account_id) {
void AccountReconcilor::OnRefreshTokensLoaded() {}
void AccountReconcilor::PerformMergeAction(const std::string& account_id) {
- // GoogleAutoLoginHelper deletes itself upon success / failure.
- GoogleAutoLoginHelper* helper = new GoogleAutoLoginHelper(profile_);
- helper->LogIn(account_id);
+ merge_session_helper_.LogIn(account_id);
}
void AccountReconcilor::PerformRemoveAction(const std::string& account_id) {

Powered by Google App Engine
This is Rietveld 408576698