Chromium Code Reviews| 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 dabe85ab9607fef23873a9725e9f27f6c6770917..ba4f66ead596505058ecf1ef1a12cbd306d22b76 100644 |
| --- a/chrome/browser/ui/webui/options/browser_options_handler.cc |
| +++ b/chrome/browser/ui/webui/options/browser_options_handler.cc |
| @@ -1144,12 +1144,17 @@ scoped_ptr<DictionaryValue> BrowserOptionsHandler::GetSyncStateDictionary() { |
| return sync_status.Pass(); |
| } |
| + bool signout_prohibited = false; |
|
Andrew T Wilson (Slow)
2013/04/09 15:39:25
Actually, I think signout should always be prohibi
tim (not reviewing)
2013/04/16 03:28:29
If I understand correctly, the way it works now is
|
| +#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", |