From d0f4b0e5b86ef0ef181d0b23257f321ae2e9fc51 Mon Sep 17 00:00:00 2001 From: "danno@chromium.org" Date: Mon, 14 Jun 2010 10:04:26 +0000 Subject: Implements policies to enable or disable the five Privacy checkboxes found in the Options dialog, in the Under the Hood section. xib changes: added an enabled binding to the policy-controlled checkboxes in the "Under the Hood" preference pane so that they can be disabled when their value is overridden by policy. The methods for the bindings are in the preference window controller. BUG=44394 TEST=ConfigurationPolicyPrefStoreTest.* and ConfigurationPolicyProviderWinTest.* Manual tests: Set the policies externally. Check that the checkbox in Options/Under the Hood/Privacy/search suggest... are disabled. Also check that the check box is set/unset as done by the policy. Review URL: http://codereview.chromium.org/2746006 Patch from Jean-Luc Brouillet . git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49675 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/options/advanced_contents_view.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'chrome/browser/views/options') diff --git a/chrome/browser/views/options/advanced_contents_view.cc b/chrome/browser/views/options/advanced_contents_view.cc index 6745011..b8b88cb 100644 --- a/chrome/browser/views/options/advanced_contents_view.cc +++ b/chrome/browser/views/options/advanced_contents_view.cc @@ -650,6 +650,17 @@ void PrivacySection::InitControlLayout() { safe_browsing_.Init(prefs::kSafeBrowsingEnabled, profile()->GetPrefs(), this); enable_metrics_recording_.Init(prefs::kMetricsReportingEnabled, g_browser_process->local_state(), this); + + + enable_link_doctor_checkbox_->SetEnabled(!alternate_error_pages_.IsManaged()); + enable_suggest_checkbox_->SetEnabled(!use_suggest_.IsManaged()); + enable_dns_prefetching_checkbox_->SetEnabled( + !dns_prefetch_enabled_.IsManaged()); + enable_safe_browsing_checkbox_->SetEnabled(!safe_browsing_.IsManaged()); +#if defined(GOOGLE_CHROME_BUILD) + reporting_enabled_checkbox_->SetEnabled( + !enable_metrics_recording_.IsManaged()); +#endif } void PrivacySection::NotifyPrefChanged(const std::wstring* pref_name) { -- cgit v1.1