diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 14:38:58 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 14:38:58 +0000 |
commit | 06a26cee05ab7e5c49f7dc5b07ed6224fe4876db (patch) | |
tree | 713d1936c9e5cc3720e562c54d3debe7a2c56e60 /chrome/browser/policy | |
parent | 294d4309fc817b6e0bc56b46a5cafbe62fc78608 (diff) | |
download | chromium_src-06a26cee05ab7e5c49f7dc5b07ed6224fe4876db.zip chromium_src-06a26cee05ab7e5c49f7dc5b07ed6224fe4876db.tar.gz chromium_src-06a26cee05ab7e5c49f7dc5b07ed6224fe4876db.tar.bz2 |
Implement policy for enabling/disabling JavaScript.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3395011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60288 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/policy')
3 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/policy/configuration_policy_pref_store.cc b/chrome/browser/policy/configuration_policy_pref_store.cc index 296094e..dde144b 100644 --- a/chrome/browser/policy/configuration_policy_pref_store.cc +++ b/chrome/browser/policy/configuration_policy_pref_store.cc @@ -126,6 +126,8 @@ const ConfigurationPolicyPrefStore::PolicyToPreferenceMapEntry prefs::kPluginsPluginsBlacklist}, { Value::TYPE_BOOLEAN, kPolicyShowHomeButton, prefs::kShowHomeButton }, + { Value::TYPE_BOOLEAN, kPolicyJavascriptEnabled, + prefs::kWebKitJavascriptEnabled }, }; const ConfigurationPolicyPrefStore::PolicyToPreferenceMapEntry @@ -213,6 +215,8 @@ ConfigurationPolicyPrefStore::GetChromePolicyValueMap() { Value::TYPE_BOOLEAN, key::kShowHomeButton }, { ConfigurationPolicyStore::kPolicyPrintingEnabled, Value::TYPE_BOOLEAN, key::kPrintingEnabled }, + { ConfigurationPolicyStore::kPolicyJavascriptEnabled, + Value::TYPE_BOOLEAN, key::kJavascriptEnabled }, }; ConfigurationPolicyProvider::StaticPolicyValueMap map = { diff --git a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc index 1786ea6..6b1bbe5 100644 --- a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc +++ b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc @@ -157,7 +157,9 @@ INSTANTIATE_TEST_CASE_P( TypeAndName(ConfigurationPolicyStore::kPolicyShowHomeButton, prefs::kShowHomeButton), TypeAndName(ConfigurationPolicyStore::kPolicyPrintingEnabled, - prefs::kPrintingEnabled))); + prefs::kPrintingEnabled), + TypeAndName(ConfigurationPolicyStore::kPolicyJavascriptEnabled, + prefs::kWebKitJavascriptEnabled))); // Test cases for integer-valued policy settings. class ConfigurationPolicyPrefStoreIntegerTest diff --git a/chrome/browser/policy/configuration_policy_store.h b/chrome/browser/policy/configuration_policy_store.h index 461ee17..dacfa37 100644 --- a/chrome/browser/policy/configuration_policy_store.h +++ b/chrome/browser/policy/configuration_policy_store.h @@ -52,6 +52,7 @@ class ConfigurationPolicyStore { kPolicyChromeFrameRendererSettings, kPolicyRenderInChromeFrameList, kPolicyRenderInHostList, + kPolicyJavascriptEnabled, }; static const int kPolicyNoProxyServerMode = 0; |