| Index: chrome/browser/sync/sync_setup_wizard.cc
|
| diff --git a/chrome/browser/sync/sync_setup_wizard.cc b/chrome/browser/sync/sync_setup_wizard.cc
|
| index 61113fdf962a9c91d0d5daebf42573de46f48bc8..614b7c275a306db344e461d0a8a9129f51495134 100644
|
| --- a/chrome/browser/sync/sync_setup_wizard.cc
|
| +++ b/chrome/browser/sync/sync_setup_wizard.cc
|
| @@ -91,11 +91,19 @@ bool SyncSetupWizard::IsVisible() const {
|
| flow_container_->get_flow()->IsAttached();
|
| }
|
|
|
| +// Returns true iff Sync is using OAuth-based authentication. See also
|
| +// GetLoginState().
|
| +// static
|
| +bool SyncSetupWizard::IsUsingOAuth() {
|
| + return CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableSyncOAuth);
|
| +}
|
| +
|
| // static
|
| SyncSetupWizard::State SyncSetupWizard::GetLoginState() {
|
| - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableSyncOAuth))
|
| - return SyncSetupWizard::OAUTH_LOGIN;
|
| - return SyncSetupWizard::GAIA_LOGIN;
|
| + return IsUsingOAuth() ?
|
| + SyncSetupWizard::OAUTH_LOGIN :
|
| + SyncSetupWizard::GAIA_LOGIN;
|
| }
|
|
|
| void SyncSetupWizard::Focus() {
|
|
|