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

Unified Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 12258036: Properly handle disabling sync via the google dashboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Skip signout on cros. Created 7 years, 10 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
« no previous file with comments | « chrome/browser/sync/sync_ui_util.cc ('k') | chrome/browser/ui/webui/sync_setup_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) ==
« no previous file with comments | « chrome/browser/sync/sync_ui_util.cc ('k') | chrome/browser/ui/webui/sync_setup_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698