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

Unified Diff: chrome/browser/ui/sync/one_click_signin_sync_starter.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/ui/sync/one_click_signin_sync_starter.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
index e075f48aef18b9524d38e98ff9d06ba89f8f82d9..ced3b51f6fc2639a70bc268576d8e027d5d41087 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
+++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
@@ -35,6 +35,7 @@
#include "chrome/browser/ui/webui/signin/login_ui_service.h"
#include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
#include "chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h"
+#include "chrome/common/profile_management_switches.h"
#include "chrome/common/url_constants.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -366,6 +367,15 @@ void OneClickSigninSyncStarter::SigninFailed(
}
void OneClickSigninSyncStarter::SigninSuccess() {
+ if (!switches::IsEnableInlineSignin())
+ MergeSessionComplete(GoogleServiceAuthError(GoogleServiceAuthError::NONE));
guohui 2013/12/19 19:28:02 So if only new profile management is turned on we
Roger Tawa OOO till Jul 10th 2013/12/19 20:46:33 We do want to ship inline sign in without profile
+}
+
+void OneClickSigninSyncStarter::MergeSessionComplete(
+ const GoogleServiceAuthError& error) {
+ // Regardless of whether the merge session completed sucessfully or not,
+ // continue with sync starting.
+
if (!sync_setup_completed_callback_.is_null())
sync_setup_completed_callback_.Run(SYNC_SETUP_SUCCESS);

Powered by Google App Engine
This is Rietveld 408576698