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

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 ntp bubble 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
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 a66d9fe20c5c013e5fd2d112369c81849f5b33fe..397958db5d142e566156861206536a6dab46aa91 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -506,7 +506,7 @@ void SyncSetupHandler::DisplayConfigureSync(bool show_advanced,
if (UseWebBasedSigninFlow()) {
// Make sure the tab used for the Gaia sign in does not cover this tab.
- BringTabToFront(web_ui()->GetWebContents());
+ FocusUI();
}
}
@@ -838,16 +838,25 @@ 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_) {
- DisplayGaiaLogin(GetSyncService()->HasUnrecoverableError());
+
+ // 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 {
- // TODO(peria): Show error dialog for prompting sign in and out on
- // Chrome OS. http://crbug.com/128692
- CloseOverlay();
+ // 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.
+ if (retry_on_signin_failure_) {
+ DisplayGaiaLogin(GetSyncService()->HasUnrecoverableError());
+ } else {
+ // TODO(peria): Show error dialog for prompting sign in and out on
+ // Chrome OS. http://crbug.com/128692
+ CloseOverlay();
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698