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

Unified Diff: chrome/browser/sync/sync_setup_wizard.cc

Issue 7497069: Support Sync following Gaia OAuth authentication (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing a stupid. Created 9 years, 4 months 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/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(
akalin 2011/08/10 19:42:01 Consider adding it to about:flags, too. It's easy
Rick Campbell 2011/08/11 03:58:23 Done, and thanks for that pointer!
+ 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() {

Powered by Google App Engine
This is Rietveld 408576698