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 042191f4123a32ed55e6683ce89eb2634c902d29..1a423cfe3a1c1d900987d80515e06850b432bcba 100644 |
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc |
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc |
@@ -1083,14 +1083,8 @@ scoped_ptr<DictionaryValue> BrowserOptionsHandler::GetSyncStateDictionary() { |
} |
// Signout is not allowed if the user has policy (crbug.com/172204). |
- bool signout_allowed = true; |
-#if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) |
- policy::UserCloudPolicyManager* policy_manager = |
- policy::UserCloudPolicyManagerFactory::GetForProfile(profile); |
- if (policy_manager) |
- signout_allowed = !policy_manager->IsClientRegistered(); |
-#endif |
- sync_status->SetBoolean("signoutAllowed", signout_allowed); |
+ SigninManager* signin = SigninManagerFactory::GetForProfile(profile); |
+ sync_status->SetBoolean("signoutAllowed", !signin->IsSignoutProhibited()); |
ProfileSyncService* service( |
ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile)); |
sync_status->SetBoolean("syncSystemEnabled", !!service); |
@@ -1101,7 +1095,6 @@ scoped_ptr<DictionaryValue> BrowserOptionsHandler::GetSyncStateDictionary() { |
string16 status_label; |
string16 link_label; |
- SigninManager* signin = SigninManagerFactory::GetForProfile(profile); |
DCHECK(signin); |
bool status_has_error = sync_ui_util::GetStatusLabels( |
service, *signin, sync_ui_util::WITH_HTML, &status_label, &link_label) == |