Index: chrome/browser/ui/webui/options/browser_options_handler.cc |
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc |
index e0e0c8e0e41f8a5de4e3dd9c038ecf93490587eb..29f249c4b474a2d1fca6448e8c2a4dbac24b06c2 100644 |
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc |
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc |
@@ -1171,12 +1171,17 @@ scoped_ptr<DictionaryValue> BrowserOptionsHandler::GetSyncStateDictionary() { |
return sync_status.Pass(); |
} |
+ bool signout_prohibited = false; |
+#if !defined(OS_CHROMEOS) |
// Signout is not allowed if the user has policy (crbug.com/172204). |
- SigninManager* signin = SigninManagerFactory::GetForProfile(profile); |
- DCHECK(signin); |
- sync_status->SetBoolean("signoutAllowed", !signin->IsSignoutProhibited()); |
+ signout_prohibited = |
+ SigninManagerFactory::GetForProfile(profile)->IsSignoutProhibited(); |
+#endif |
+ |
ProfileSyncService* service( |
ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile)); |
+ SigninManagerBase* signin = service->signin(); |
+ sync_status->SetBoolean("signoutAllowed", !signout_prohibited); |
sync_status->SetBoolean("signinAllowed", signin->IsSigninAllowed()); |
sync_status->SetBoolean("syncSystemEnabled", !!service); |
sync_status->SetBoolean("setupCompleted", |