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

Unified Diff: chrome/browser/ui/webui/sync_setup_handler.cc

Issue 11411267: Make sure to display an errors that occur during the chrome sign in process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests Created 8 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
« no previous file with comments | « chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/sync_setup_handler.cc
diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
index 047d450cfa2af543094c23bd33f121eb382b1a38..0099937468eaa007829043543bb63dbfb218245b 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -399,9 +399,7 @@ void SyncSetupHandler::DisplayConfigureSync(bool show_advanced,
service->UnsuppressAndStart();
DisplaySpinner();
// To listen to the token available notifications, start SigninTracker.
- signin_tracker_.reset(
- new SigninTracker(GetProfile(), this,
- SigninTracker::SERVICES_INITIALIZING));
+ signin_tracker_.reset(new SigninTracker(GetProfile(), this));
return;
}
@@ -507,7 +505,7 @@ void SyncSetupHandler::DisplayConfigureSync(bool show_advanced,
if (UseWebBasedSigninFlow()) {
// Make sure the tab used for the Gaia sign in does not cover the settings
// tab.
- BringTabToFront(web_ui()->GetWebContents());
+ FocusUI();
}
}
@@ -841,11 +839,18 @@ void SyncSetupHandler::SigninFailed(const GoogleServiceAuthError& error) {
backend_start_timer_.reset();
last_signin_error_ = error;
- // Got a failed signin - this is either just a typical auth error, or a
- // sync error (treat sync errors as "fatal errors" - i.e. non-auth errors).
- // On ChromeOS, this condition can happen when auth token is invalid and
- // cannot start sync backend.
- if (retry_on_signin_failure_) {
+
+ // If using web-based sign in flow, don't show the gaia sign in page again
+ // since there is no way to show the user an error message.
+ if (UseWebBasedSigninFlow()) {
+ CloseSyncSetup();
+ } else if (retry_on_signin_failure_) {
+ // Got a failed signin - this is either just a typical auth error, or a
+ // sync error (treat sync errors as "fatal errors" - i.e. non-auth errors).
+ // On ChromeOS, this condition can happen when auth token is invalid and
+ // cannot start sync backend.
+ // If using web-based sign in flow, don't show the gaia sign in page again
+ // since there is no way to show the user an error message.
DisplayGaiaLogin(GetSyncService()->HasUnrecoverableError());
} else {
// TODO(peria): Show error dialog for prompting sign in and out on
« no previous file with comments | « chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698