diff options
author | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-20 21:24:45 +0000 |
---|---|---|
committer | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-20 21:24:45 +0000 |
commit | f553c3826590d980973269d17be1f09e075f98af (patch) | |
tree | 8b776d47367becdb4a8941fd7f2bdaab3ec9e239 /chrome/browser/policy | |
parent | 865394df590aabeeb15db51ac159f165fd6d9c9c (diff) | |
download | chromium_src-f553c3826590d980973269d17be1f09e075f98af.zip chromium_src-f553c3826590d980973269d17be1f09e075f98af.tar.gz chromium_src-f553c3826590d980973269d17be1f09e075f98af.tar.bz2 |
Added group policy for disabling all client-side 3D APIs in Chromium
(in particular, WebGL and Pepper 3D). This has been hooked up through
a new command-line argument (--disable-3d-apis) orthogonal to the
existing ones, so that further changes to those command line arguments
will not accidentally regress the group policy support.
Tested in the following ways:
- Verified that --disable-3d-apis disables WebGL and Pepper 3D
support on Mac OS X.
- Verified that specifying the Disable3DAPIs policy via a JSON file
disables WebGL on Linux.
- Ran unit_tests and verified that there were no failures introduced.
BUG=64806
TEST=ConfigurationPolicyPrefStoreBooleanTest
Review URL: http://codereview.chromium.org/5991003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69753 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 813eecc..3971980 100644 --- a/chrome/browser/policy/configuration_policy_pref_store.cc +++ b/chrome/browser/policy/configuration_policy_pref_store.cc @@ -190,6 +190,8 @@ const ConfigurationPolicyPrefStore::PolicyToPreferenceMapEntry prefs::kAuthNegotiateDelegateWhitelist }, { Value::TYPE_STRING, kPolicyGSSAPILibraryName, prefs::kGSSAPILibraryName }, + { Value::TYPE_BOOLEAN, kPolicyDisable3DAPIs, + prefs::kDisable3DAPIs }, #if defined(OS_CHROMEOS) { Value::TYPE_BOOLEAN, kPolicyChromeOsLockOnIdleSuspend, @@ -310,6 +312,8 @@ ConfigurationPolicyPrefStore::GetChromePolicyDefinitionList() { key::kAuthNegotiateDelegateWhitelist }, { kPolicyGSSAPILibraryName, Value::TYPE_STRING, key::kGSSAPILibraryName }, + { kPolicyDisable3DAPIs, Value::TYPE_BOOLEAN, + key::kDisable3DAPIs }, #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 80c69e4..43e1295 100644 --- a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc +++ b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc @@ -185,7 +185,9 @@ INSTANTIATE_TEST_CASE_P( TypeAndName(kPolicyDisableAuthNegotiateCnameLookup, prefs::kDisableAuthNegotiateCnameLookup), TypeAndName(kPolicyEnableAuthNegotiatePort, - prefs::kEnableAuthNegotiatePort))); + prefs::kEnableAuthNegotiatePort), + TypeAndName(kPolicyDisable3DAPIs, + prefs::kDisable3DAPIs))); #if defined(OS_CHROMEOS) INSTANTIATE_TEST_CASE_P( diff --git a/chrome/browser/policy/configuration_policy_store_interface.h b/chrome/browser/policy/configuration_policy_store_interface.h index 860f3a4..00ebf30 100644 --- a/chrome/browser/policy/configuration_policy_store_interface.h +++ b/chrome/browser/policy/configuration_policy_store_interface.h @@ -66,6 +66,7 @@ enum ConfigurationPolicyType { kPolicyAuthServerWhitelist, kPolicyAuthNegotiateDelegateWhitelist, kPolicyGSSAPILibraryName, + kPolicyDisable3DAPIs }; static const int kPolicyNoProxyServerMode = 0; |