summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authordmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-11 23:02:21 +0000
committerdmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-11 23:02:21 +0000
commit115d7acb7eb6da7cc8db153e42c2606a6c38d661 (patch)
tree158975d47c02ea0801275f3830a12ed850b0da8b /chrome_frame
parentf0696760a9e7859c9a4b1657638a15282af93004 (diff)
downloadchromium_src-115d7acb7eb6da7cc8db153e42c2606a6c38d661.zip
chromium_src-115d7acb7eb6da7cc8db153e42c2606a6c38d661.tar.gz
chromium_src-115d7acb7eb6da7cc8db153e42c2606a6c38d661.tar.bz2
Revert 193649 "Change PolicyLoaderWin to load PReg files if poss..."
Caused lots of unit_tests to fail on XP, such as: PolicyProviderWinTest/ConfigurationPolicyProviderTest.StringListValue PolicyProviderWinTest/ConfigurationPolicyProviderTest.IntegerValue > Change PolicyLoaderWin to load PReg files if possible. > > We now query whether GPO is present and read directly from the corresponding > PReg files. The registry is used only as a fallback source for policy values. > To accomplish this, PolicyLoaderWin now works in two steps: It first converts > the GPO input into base::Value representation and then maps that to proper > policy values. This also unifies the handling for Chrome policy and 3rd-party > policy. > > BUG=chromium:186445 > TEST=unit tests > TBR=grt@chromium.org, cpu@chromium.org, ben@chromium.org > > Review URL: https://codereview.chromium.org/13619014 TBR=mnissler@chromium.org Review URL: https://codereview.chromium.org/14087006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193793 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/chrome_launcher.cc2
-rw-r--r--chrome_frame/policy_settings.cc6
-rw-r--r--chrome_frame/test/policy_settings_unittest.cc6
3 files changed, 7 insertions, 7 deletions
diff --git a/chrome_frame/chrome_launcher.cc b/chrome_frame/chrome_launcher.cc
index 28613f4..88fc0da 100644
--- a/chrome_frame/chrome_launcher.cc
+++ b/chrome_frame/chrome_launcher.cc
@@ -164,7 +164,7 @@ void AppendAdditionalLaunchParameters(std::wstring* command_line) {
LONG result;
bool found = false;
for (int i = 0; !found && i < arraysize(kRootKeys); ++i) {
- result = ::RegOpenKeyExW(kRootKeys[i], policy::kRegistryChromePolicyKey, 0,
+ result = ::RegOpenKeyExW(kRootKeys[i], policy::kRegistryMandatorySubKey, 0,
KEY_QUERY_VALUE, &key);
if (result == ERROR_SUCCESS) {
DWORD size = 0;
diff --git a/chrome_frame/policy_settings.cc b/chrome_frame/policy_settings.cc
index 846fd99..bc873e8 100644
--- a/chrome_frame/policy_settings.cc
+++ b/chrome_frame/policy_settings.cc
@@ -74,7 +74,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::kRegistryChromePolicyKey,
+ if ((config_key.Open(kRootKeys[i], policy::kRegistryMandatorySubKey,
KEY_READ) == ERROR_SUCCESS) &&
(config_key.ReadValueDW(settings_value.c_str(),
&value) == ERROR_SUCCESS)) {
@@ -109,7 +109,7 @@ void PolicySettings::ReadContentTypeSetting(
std::vector<std::wstring>* content_type_list) {
DCHECK(content_type_list);
- std::wstring sub_key(policy::kRegistryChromePolicyKey);
+ std::wstring sub_key(policy::kRegistryMandatorySubKey);
sub_key += L"\\";
sub_key += ASCIIToWide(policy::key::kChromeFrameContentTypes);
@@ -128,7 +128,7 @@ void PolicySettings::ReadStringSetting(const char* value_name,
base::win::RegKey config_key;
std::wstring value_name_str(ASCIIToWide(value_name));
for (int i = 0; i < arraysize(kRootKeys); ++i) {
- if ((config_key.Open(kRootKeys[i], policy::kRegistryChromePolicyKey,
+ if ((config_key.Open(kRootKeys[i], policy::kRegistryMandatorySubKey,
KEY_READ) == ERROR_SUCCESS) &&
(config_key.ReadValue(value_name_str.c_str(),
value) == ERROR_SUCCESS)) {
diff --git a/chrome_frame/test/policy_settings_unittest.cc b/chrome_frame/test/policy_settings_unittest.cc
index 343b426..e13af50 100644
--- a/chrome_frame/test/policy_settings_unittest.cc
+++ b/chrome_frame/test/policy_settings_unittest.cc
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/at_exit.h"
#include "base/basictypes.h"
+#include "base/at_exit.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/stringprintf.h"
@@ -23,7 +23,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::kRegistryChromePolicyKey,
+ if (key.Open(root, policy::kRegistryMandatorySubKey,
KEY_ALL_ACCESS) == ERROR_SUCCESS) {
key.DeleteValue(
ASCIIToWide(policy::key::kChromeFrameRendererSettings).c_str());
@@ -36,7 +36,7 @@ void DeleteChromeFramePolicyEntries(HKEY root) {
bool InitializePolicyKey(HKEY policy_root, RegKey* policy_key) {
EXPECT_EQ(ERROR_SUCCESS, policy_key->Create(policy_root,
- policy::kRegistryChromePolicyKey, KEY_ALL_ACCESS));
+ policy::kRegistryMandatorySubKey, KEY_ALL_ACCESS));
return policy_key->Valid();
}