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

Unified Diff: chrome/browser/ui/webui/settings/settings_default_browser_handler.cc

Issue 2846043002: MD Settings: fix policy control detection on default browser section (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/settings/settings_default_browser_handler.cc
diff --git a/chrome/browser/ui/webui/settings/settings_default_browser_handler.cc b/chrome/browser/ui/webui/settings/settings_default_browser_handler.cc
index f8cb64a19a848340fe27c164d98a8a4303399d16..03abb0f60e1db2483049d50fb50cf1274d71a1b0 100644
--- a/chrome/browser/ui/webui/settings/settings_default_browser_handler.cc
+++ b/chrome/browser/ui/webui/settings/settings_default_browser_handler.cc
@@ -22,7 +22,10 @@ bool DefaultBrowserIsDisabledByPolicy() {
g_browser_process->local_state()->FindPreference(
prefs::kDefaultBrowserSettingEnabled);
DCHECK(pref);
- return pref->IsManaged() && !pref->GetValue();
+ bool may_set_default_browser;
+ bool success = pref->GetValue()->GetAsBoolean(&may_set_default_browser);
+ DCHECK(success);
+ return pref->IsManaged() && !may_set_default_browser;
}
} // namespace
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698