diff options
author | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-01 13:14:50 +0000 |
---|---|---|
committer | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-01 13:14:50 +0000 |
commit | 6fd9df6e95ede5d08f70bade7bc36767739865d5 (patch) | |
tree | 7ac69d3bf44d7e02572bad29650829564add1076 /chrome_frame | |
parent | 3fc40c14495f094dbb47ae4237e8d013304de0f4 (diff) | |
download | chromium_src-6fd9df6e95ede5d08f70bade7bc36767739865d5.zip chromium_src-6fd9df6e95ede5d08f70bade7bc36767739865d5.tar.gz chromium_src-6fd9df6e95ede5d08f70bade7bc36767739865d5.tar.bz2 |
Added recommended pref store on Windows.
BUG=49941
TEST=Set policies for Chromium/Chrome in a registry subkey named "Recommended". Those policies become the default values and can be overridden by the user.
Review URL: http://codereview.chromium.org/8551010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112456 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/policy_settings.cc | 6 | ||||
-rw-r--r-- | chrome_frame/test/policy_settings_unittest.cc | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/chrome_frame/policy_settings.cc b/chrome_frame/policy_settings.cc index 97c0810..d3a6f33 100644 --- a/chrome_frame/policy_settings.cc +++ b/chrome_frame/policy_settings.cc @@ -70,7 +70,7 @@ void PolicySettings::ReadUrlSettings( std::wstring settings_value( ASCIIToWide(policy::key::kChromeFrameRendererSettings)); for (int i = 0; i < arraysize(kRootKeys); ++i) { - if ((config_key.Open(kRootKeys[i], policy::kRegistrySubKey, + if ((config_key.Open(kRootKeys[i], policy::kRegistryMandatorySubKey, KEY_READ) == ERROR_SUCCESS) && (config_key.ReadValueDW(settings_value.c_str(), &value) == ERROR_SUCCESS)) { @@ -105,7 +105,7 @@ void PolicySettings::ReadContentTypeSetting( std::vector<std::wstring>* content_type_list) { DCHECK(content_type_list); - std::wstring sub_key(policy::kRegistrySubKey); + std::wstring sub_key(policy::kRegistryMandatorySubKey); sub_key += L"\\"; sub_key += ASCIIToWide(policy::key::kChromeFrameContentTypes); @@ -126,7 +126,7 @@ void PolicySettings::ReadApplicationLocaleSetting( std::wstring application_locale_value( ASCIIToWide(policy::key::kApplicationLocaleValue)); for (int i = 0; i < arraysize(kRootKeys); ++i) { - if ((config_key.Open(kRootKeys[i], policy::kRegistrySubKey, + if ((config_key.Open(kRootKeys[i], policy::kRegistryMandatorySubKey, KEY_READ) == ERROR_SUCCESS) && (config_key.ReadValue(application_locale_value.c_str(), application_locale) == ERROR_SUCCESS)) { diff --git a/chrome_frame/test/policy_settings_unittest.cc b/chrome_frame/test/policy_settings_unittest.cc index 99d970f..f3d5e12 100644 --- a/chrome_frame/test/policy_settings_unittest.cc +++ b/chrome_frame/test/policy_settings_unittest.cc @@ -22,7 +22,7 @@ namespace { // A best effort way to zap CF policy entries that may be in the registry. void DeleteChromeFramePolicyEntries(HKEY root) { RegKey key; - if (key.Open(root, policy::kRegistrySubKey, + if (key.Open(root, policy::kRegistryMandatorySubKey, KEY_ALL_ACCESS) == ERROR_SUCCESS) { key.DeleteValue( ASCIIToWide(policy::key::kChromeFrameRendererSettings).c_str()); @@ -35,7 +35,7 @@ void DeleteChromeFramePolicyEntries(HKEY root) { bool InitializePolicyKey(HKEY policy_root, RegKey* policy_key) { EXPECT_EQ(ERROR_SUCCESS, policy_key->Create(policy_root, - policy::kRegistrySubKey, KEY_ALL_ACCESS)); + policy::kRegistryMandatorySubKey, KEY_ALL_ACCESS)); return policy_key->Valid(); } |