Chromium Code Reviews| 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..f73fc71ca10e685ad4d4d92d6713a414ee38eb28 100644 |
| --- a/chrome/browser/ui/webui/sync_setup_handler.cc |
| +++ b/chrome/browser/ui/webui/sync_setup_handler.cc |
| @@ -507,7 +507,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,16 +841,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_) { |
|
Evan Stade
2012/12/04 20:42:32
if {} else {if {} else {}} ==> if {} else if {} el
Roger Tawa OOO till Jul 10th
2012/12/04 21:18:36
Done.
|
| + DisplayGaiaLogin(GetSyncService()->HasUnrecoverableError()); |
| + } else { |
| + // TODO(peria): Show error dialog for prompting sign in and out on |
| + // Chrome OS. http://crbug.com/128692 |
| + CloseOverlay(); |
| + } |
| } |
| } |