summaryrefslogtreecommitdiffstats
path: root/chrome/browser/policy
diff options
context:
space:
mode:
authorscottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-02 22:41:55 +0000
committerscottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-02 22:41:55 +0000
commit06c1732ba7d024e0144759597df38289f7cc82da (patch)
treedbb764ae23bf12916e5d8094d87602a980971e49 /chrome/browser/policy
parentd4d304a5532717d92098d66bf1063c687d764833 (diff)
downloadchromium_src-06c1732ba7d024e0144759597df38289f7cc82da.zip
chromium_src-06c1732ba7d024e0144759597df38289f7cc82da.tar.gz
chromium_src-06c1732ba7d024e0144759597df38289f7cc82da.tar.bz2
Cloud print proxy enablement under policy control.
Implement policy control of the cloud print policy, in just the UI part for now (in the service requires some refactoring). BUG=59769 TEST=Change the policy and verifying that the UI in Under the Hood gets disabled or enabled properly, with the policy notification at the top. Review URL: http://codereview.chromium.org/6344013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73523 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/policy')
-rw-r--r--chrome/browser/policy/config_dir_policy_provider_unittest.cc5
-rw-r--r--chrome/browser/policy/configuration_policy_pref_store.cc4
-rw-r--r--chrome/browser/policy/configuration_policy_pref_store_unittest.cc2
-rw-r--r--chrome/browser/policy/configuration_policy_provider_mac_unittest.cc7
-rw-r--r--chrome/browser/policy/configuration_policy_provider_win_unittest.cc5
-rw-r--r--chrome/browser/policy/managed_prefs_banner_base.cc1
6 files changed, 20 insertions, 4 deletions
diff --git a/chrome/browser/policy/config_dir_policy_provider_unittest.cc b/chrome/browser/policy/config_dir_policy_provider_unittest.cc
index 784facd..9a31e55 100644
--- a/chrome/browser/policy/config_dir_policy_provider_unittest.cc
+++ b/chrome/browser/policy/config_dir_policy_provider_unittest.cc
@@ -329,6 +329,9 @@ INSTANTIATE_TEST_CASE_P(
key::kInstantEnabled),
ValueTestParams::ForBooleanPolicy(
kPolicyIncognitoEnabled,
- key::kIncognitoEnabled)));
+ key::kIncognitoEnabled),
+ ValueTestParams::ForBooleanPolicy(
+ kPolicyCloudPrintProxyEnabled,
+ key::kCloudPrintProxyEnabled)));
} // namespace policy
diff --git a/chrome/browser/policy/configuration_policy_pref_store.cc b/chrome/browser/policy/configuration_policy_pref_store.cc
index 424c42a..3abdf8f 100644
--- a/chrome/browser/policy/configuration_policy_pref_store.cc
+++ b/chrome/browser/policy/configuration_policy_pref_store.cc
@@ -230,6 +230,8 @@ const ConfigurationPolicyPrefKeeper::PolicyToPreferenceMapEntry
{ Value::TYPE_BOOLEAN, kPolicyInstantEnabled, prefs::kInstantEnabled },
{ Value::TYPE_BOOLEAN, kPolicyDefaultBrowserSettingEnabled,
prefs::kDefaultBrowserSettingEnabled },
+ { Value::TYPE_BOOLEAN, kPolicyCloudPrintProxyEnabled,
+ prefs::kCloudPrintProxyEnabled },
#if defined(OS_CHROMEOS)
{ Value::TYPE_BOOLEAN, kPolicyChromeOsLockOnIdleSuspend,
@@ -847,6 +849,8 @@ ConfigurationPolicyPrefStore::GetChromePolicyDefinitionList() {
{ kPolicyInstantEnabled, Value::TYPE_BOOLEAN, key::kInstantEnabled },
{ kPolicyDefaultBrowserSettingEnabled, Value::TYPE_BOOLEAN,
key::kDefaultBrowserSettingEnabled },
+ { kPolicyCloudPrintProxyEnabled, Value::TYPE_BOOLEAN,
+ key::kCloudPrintProxyEnabled },
#if defined(OS_CHROMEOS)
{ kPolicyChromeOsLockOnIdleSuspend, Value::TYPE_BOOLEAN,
diff --git a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
index c5c13fc..84d2885 100644
--- a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
+++ b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
@@ -178,6 +178,8 @@ INSTANTIATE_TEST_CASE_P(
prefs::kWebKitJavascriptEnabled),
TypeAndName(kPolicyIncognitoEnabled,
prefs::kIncognitoEnabled),
+ TypeAndName(kPolicyCloudPrintProxyEnabled,
+ prefs::kCloudPrintProxyEnabled),
TypeAndName(kPolicySavingBrowserHistoryDisabled,
prefs::kSavingBrowserHistoryDisabled),
TypeAndName(kPolicySavingBrowserHistoryDisabled,
diff --git a/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc b/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc
index 541f6dc..fae2597 100644
--- a/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc
+++ b/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -300,6 +300,9 @@ INSTANTIATE_TEST_CASE_P(
key::kInstantEnabled),
PolicyTestParams::ForIntegerPolicy(
kPolicyPolicyRefreshRate,
- key::kPolicyRefreshRate)));
+ key::kPolicyRefreshRate),
+ PolicyTestParams::ForBooleanPolicy(
+ kPolicyCloudPrintProxyEnabled,
+ key::kCloudPrintProxyEnabled)));
} // namespace policy
diff --git a/chrome/browser/policy/configuration_policy_provider_win_unittest.cc b/chrome/browser/policy/configuration_policy_provider_win_unittest.cc
index 365257a..b929e4a 100644
--- a/chrome/browser/policy/configuration_policy_provider_win_unittest.cc
+++ b/chrome/browser/policy/configuration_policy_provider_win_unittest.cc
@@ -458,6 +458,9 @@ INSTANTIATE_TEST_CASE_P(
key::kInstantEnabled),
PolicyTestParams::ForBooleanPolicy(
kPolicyIncognitoEnabled,
- key::kIncognitoEnabled)));
+ key::kIncognitoEnabled),
+ PolicyTestParams::ForBooleanPolicy(
+ kPolicyCloudPrintProxyEnabled,
+ key::kCloudPrintProxyEnabled)));
} // namespace policy
diff --git a/chrome/browser/policy/managed_prefs_banner_base.cc b/chrome/browser/policy/managed_prefs_banner_base.cc
index 4fd93ea..b4253b4 100644
--- a/chrome/browser/policy/managed_prefs_banner_base.cc
+++ b/chrome/browser/policy/managed_prefs_banner_base.cc
@@ -91,6 +91,7 @@ void ManagedPrefsBannerBase::Init(PrefService* local_state,
AddUserPref(prefs::kProxyServer);
AddUserPref(prefs::kProxyPacUrl);
AddUserPref(prefs::kProxyBypassList);
+ AddUserPref(prefs::kCloudPrintProxyEnabled);
break;
default:
NOTREACHED();