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 c3b95dae6377da510be8e331aa066d00ce050026..5a1a63375252efe929a55e3d5567898ce0248cd4 100644 |
--- a/chrome/browser/ui/webui/sync_setup_handler.cc |
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc |
@@ -872,7 +872,7 @@ void SyncSetupHandler::OpenSyncSetup(bool force_login) { |
// There are several different UI flows that can bring the user here: |
// 1) Signin promo (passes force_login=true) |
- // 2) Normal signin through options page (AreCredentialsAvailable() will |
+ // 2) Normal signin through options page (IsSyncEnabledAndLoggedIn() will |
// return false). |
// 3) Previously working credentials have expired |
// (service->GetAuthError() != NONE). |
@@ -885,7 +885,8 @@ void SyncSetupHandler::OpenSyncSetup(bool force_login) { |
// 7) ChromeOS re-enable after disabling sync. |
#if !defined(OS_CHROMEOS) |
if (force_login || |
- !service->AreCredentialsAvailable() || |
+ !service->IsSyncEnabledAndLoggedIn() || |
+ !service->IsSyncTokenAvailable() || |
Nicolas Zea
2012/05/15 23:39:04
Do we want to check the token here? Presumably if
Andrew T Wilson (Slow)
2012/05/16 01:05:16
It shouldn't matter if we check both or not (and i
|
service->GetAuthError().state() != GoogleServiceAuthError::NONE) { |
// User is not logged in, or login has been specially requested - need to |
// display login UI (cases 1-4). |