summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-02 18:53:49 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-02 18:53:49 +0000
commit3d54b8c75156ec73caa1407d6e50389d836ac7ef (patch)
treeca00baaf61a424d1730d11a6686d442a32801ba1 /chrome
parent973ef7f646b638264aef96e2a0911dc7c4fbba53 (diff)
downloadchromium_src-3d54b8c75156ec73caa1407d6e50389d836ac7ef.zip
chromium_src-3d54b8c75156ec73caa1407d6e50389d836ac7ef.tar.gz
chromium_src-3d54b8c75156ec73caa1407d6e50389d836ac7ef.tar.bz2
Adds the ability for instant to be controlled by group policy.
BUG=64922 TEST=none Review URL: http://codereview.chromium.org/6312070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73483 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/policy/policy_templates.json15
-rw-r--r--chrome/browser/policy/config_dir_policy_provider_unittest.cc3
-rw-r--r--chrome/browser/policy/configuration_policy_pref_store.cc2
-rw-r--r--chrome/browser/policy/configuration_policy_pref_store_unittest.cc2
-rw-r--r--chrome/browser/policy/configuration_policy_provider_mac_unittest.cc3
-rw-r--r--chrome/browser/policy/configuration_policy_provider_win_unittest.cc3
-rw-r--r--chrome/browser/policy/managed_prefs_banner_base.cc1
7 files changed, 29 insertions, 0 deletions
diff --git a/chrome/app/policy/policy_templates.json b/chrome/app/policy/policy_templates.json
index f93a4f4..3341040 100644
--- a/chrome/app/policy/policy_templates.json
+++ b/chrome/app/policy/policy_templates.json
@@ -1100,6 +1100,21 @@
If you enable or disable this setting, users cannot change or override this setting in <ph name="PRODUCT_NAME">$1<ex>Google Chrome OS</ex></ph>.''',
},
+ {
+ 'name': 'InstantEnabled',
+ 'type': 'main',
+ 'supported_on': ['chrome.*:11-'],
+ 'features': {'dynamic_refresh': 1},
+ 'example_value': True,
+ 'caption': '''Enable Instant''',
+ 'desc': '''Enables <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>'s Instant feature and prevents users from changing this setting.
+
+ If you enable this setting, <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> Instant is enabled.
+
+ If you disable this setting, <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> Instant is disabled.
+
+ If you enable or disable this setting, users cannot change or override this setting.''',
+ },
],
'messages': {
# Messages that are not associated to any policies.
diff --git a/chrome/browser/policy/config_dir_policy_provider_unittest.cc b/chrome/browser/policy/config_dir_policy_provider_unittest.cc
index e674a6a..784facd 100644
--- a/chrome/browser/policy/config_dir_policy_provider_unittest.cc
+++ b/chrome/browser/policy/config_dir_policy_provider_unittest.cc
@@ -325,6 +325,9 @@ INSTANTIATE_TEST_CASE_P(
kPolicyPolicyRefreshRate,
key::kPolicyRefreshRate),
ValueTestParams::ForBooleanPolicy(
+ kPolicyInstantEnabled,
+ key::kInstantEnabled),
+ ValueTestParams::ForBooleanPolicy(
kPolicyIncognitoEnabled,
key::kIncognitoEnabled)));
diff --git a/chrome/browser/policy/configuration_policy_pref_store.cc b/chrome/browser/policy/configuration_policy_pref_store.cc
index b19b3a1..424c42a 100644
--- a/chrome/browser/policy/configuration_policy_pref_store.cc
+++ b/chrome/browser/policy/configuration_policy_pref_store.cc
@@ -227,6 +227,7 @@ const ConfigurationPolicyPrefKeeper::PolicyToPreferenceMapEntry
prefs::kDisable3DAPIs },
{ Value::TYPE_INTEGER, kPolicyPolicyRefreshRate,
prefs::kPolicyRefreshRate },
+ { Value::TYPE_BOOLEAN, kPolicyInstantEnabled, prefs::kInstantEnabled },
{ Value::TYPE_BOOLEAN, kPolicyDefaultBrowserSettingEnabled,
prefs::kDefaultBrowserSettingEnabled },
@@ -843,6 +844,7 @@ ConfigurationPolicyPrefStore::GetChromePolicyDefinitionList() {
key::kDisable3DAPIs },
{ kPolicyPolicyRefreshRate, Value::TYPE_INTEGER,
key::kPolicyRefreshRate },
+ { kPolicyInstantEnabled, Value::TYPE_BOOLEAN, key::kInstantEnabled },
{ kPolicyDefaultBrowserSettingEnabled, Value::TYPE_BOOLEAN,
key::kDefaultBrowserSettingEnabled },
diff --git a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
index b948712..c5c13fc 100644
--- a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
+++ b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
@@ -186,6 +186,8 @@ INSTANTIATE_TEST_CASE_P(
prefs::kDisableAuthNegotiateCnameLookup),
TypeAndName(kPolicyEnableAuthNegotiatePort,
prefs::kEnableAuthNegotiatePort),
+ TypeAndName(kPolicyInstantEnabled,
+ prefs::kInstantEnabled),
TypeAndName(kPolicyDisable3DAPIs,
prefs::kDisable3DAPIs)));
diff --git a/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc b/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc
index c0f1e30..541f6dc 100644
--- a/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc
+++ b/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc
@@ -295,6 +295,9 @@ INSTANTIATE_TEST_CASE_P(
PolicyTestParams::ForBooleanPolicy(
kPolicyPrintingEnabled,
key::kPrintingEnabled),
+ PolicyTestParams::ForBooleanPolicy(
+ kPolicyInstantEnabled,
+ key::kInstantEnabled),
PolicyTestParams::ForIntegerPolicy(
kPolicyPolicyRefreshRate,
key::kPolicyRefreshRate)));
diff --git a/chrome/browser/policy/configuration_policy_provider_win_unittest.cc b/chrome/browser/policy/configuration_policy_provider_win_unittest.cc
index d62a1d5..365257a 100644
--- a/chrome/browser/policy/configuration_policy_provider_win_unittest.cc
+++ b/chrome/browser/policy/configuration_policy_provider_win_unittest.cc
@@ -454,6 +454,9 @@ INSTANTIATE_TEST_CASE_P(
kPolicyPolicyRefreshRate,
key::kPolicyRefreshRate),
PolicyTestParams::ForBooleanPolicy(
+ kPolicyInstantEnabled,
+ key::kInstantEnabled),
+ PolicyTestParams::ForBooleanPolicy(
kPolicyIncognitoEnabled,
key::kIncognitoEnabled)));
diff --git a/chrome/browser/policy/managed_prefs_banner_base.cc b/chrome/browser/policy/managed_prefs_banner_base.cc
index 2693054..4fd93ea 100644
--- a/chrome/browser/policy/managed_prefs_banner_base.cc
+++ b/chrome/browser/policy/managed_prefs_banner_base.cc
@@ -67,6 +67,7 @@ void ManagedPrefsBannerBase::Init(PrefService* local_state,
AddUserPref(prefs::kDefaultSearchProviderSuggestURL);
AddUserPref(prefs::kDefaultSearchProviderIconURL);
AddUserPref(prefs::kDefaultSearchProviderEncodings);
+ AddUserPref(prefs::kInstantEnabled);
AddLocalStatePref(prefs::kDefaultBrowserSettingEnabled);
break;
case OPTIONS_PAGE_CONTENT: