diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-28 00:31:53 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-28 00:31:53 +0000 |
commit | 8c0a4284d50894ecc26f996f816c1f32cabbabb3 (patch) | |
tree | 1d7b791d1855547d6ab752f0af0e82b0ea54e3c5 /chrome/browser | |
parent | 357f1705d94ad22ef188f381e9b5277a41e3e96c (diff) | |
download | chromium_src-8c0a4284d50894ecc26f996f816c1f32cabbabb3.zip chromium_src-8c0a4284d50894ecc26f996f816c1f32cabbabb3.tar.gz chromium_src-8c0a4284d50894ecc26f996f816c1f32cabbabb3.tar.bz2 |
Reland r57575 - Remove the default argument from RegKey::Open.
This fix the bad rebase conflict.
BUG=44644
TEST=base_unittests --gtest_filter=RegistryTest.*
Review URL: http://codereview.chromium.org/3185032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57758 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
4 files changed, 11 insertions, 9 deletions
diff --git a/chrome/browser/extensions/extension_rlz_apitest.cc b/chrome/browser/extensions/extension_rlz_apitest.cc index 910a530..c9c1416 100644 --- a/chrome/browser/extensions/extension_rlz_apitest.cc +++ b/chrome/browser/extensions/extension_rlz_apitest.cc @@ -71,7 +71,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Rlz) { // Now make sure we recorded what was expected. If the code in test.js // changes, need to make appropriate changes here. - key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\N"); + key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\N", + KEY_READ); ASSERT_TRUE(key.Valid()); DWORD value; @@ -85,7 +86,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Rlz) { ASSERT_TRUE(key.ReadValueDW(L"D4I", &value)); ASSERT_EQ(1, value); - key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\D"); + key.Open(HKEY_CURRENT_USER, L"Software\\Google\\Common\\Rlz\\Events\\D", + KEY_READ); ASSERT_FALSE(key.Valid()); // Cleanup. diff --git a/chrome/browser/extensions/external_registry_extension_provider_win.cc b/chrome/browser/extensions/external_registry_extension_provider_win.cc index d34735f..35ed4ae 100644 --- a/chrome/browser/extensions/external_registry_extension_provider_win.cc +++ b/chrome/browser/extensions/external_registry_extension_provider_win.cc @@ -37,7 +37,7 @@ void ExternalRegistryExtensionProvider::VisitRegisteredExtension( std::wstring key_path = ASCIIToWide(kRegistryExtensions); key_path.append(L"\\"); key_path.append(iterator.Name()); - if (key.Open(kRegRoot, key_path.c_str())) { + if (key.Open(kRegRoot, key_path.c_str(), KEY_READ)) { std::wstring extension_path; if (key.ReadValue(kRegistryExtensionPath, &extension_path)) { std::wstring extension_version; @@ -77,7 +77,7 @@ Version* ExternalRegistryExtensionProvider::RegisteredVersion( key_path.append(L"\\"); key_path.append(ASCIIToWide(id)); - if (!key.Open(kRegRoot, key_path.c_str())) + if (!key.Open(kRegRoot, key_path.c_str(), KEY_READ)) return NULL; std::wstring extension_version; diff --git a/chrome/browser/platform_util_win.cc b/chrome/browser/platform_util_win.cc index 1c69075..d932b74 100644 --- a/chrome/browser/platform_util_win.cc +++ b/chrome/browser/platform_util_win.cc @@ -113,7 +113,7 @@ void OpenExternal(const GURL& url) { RegKey key; std::wstring registry_path = ASCIIToWide(url.scheme()) + L"\\shell\\open\\command"; - key.Open(HKEY_CLASSES_ROOT, registry_path.c_str()); + key.Open(HKEY_CLASSES_ROOT, registry_path.c_str(), KEY_READ); if (key.Valid()) { DWORD size = 0; key.ReadValue(NULL, NULL, &size); diff --git a/chrome/browser/policy/configuration_policy_provider_win.cc b/chrome/browser/policy/configuration_policy_provider_win.cc index 5d79da6..0ccb559 100644 --- a/chrome/browser/policy/configuration_policy_provider_win.cc +++ b/chrome/browser/policy/configuration_policy_provider_win.cc @@ -62,13 +62,13 @@ bool ConfigurationPolicyProviderWin::GetRegistryPolicyString( string16 path = string16(policy::kRegistrySubKey); RegKey policy_key; // First try the global policy. - if (policy_key.Open(HKEY_LOCAL_MACHINE, path.c_str())) { + if (policy_key.Open(HKEY_LOCAL_MACHINE, path.c_str(), KEY_READ)) { if (ReadRegistryStringValue(&policy_key, name, result)) return true; policy_key.Close(); } // Fall back on user-specific policy. - if (!policy_key.Open(HKEY_CURRENT_USER, path.c_str())) + if (!policy_key.Open(HKEY_CURRENT_USER, path.c_str(), KEY_READ)) return false; return ReadRegistryStringValue(&policy_key, name, result); } @@ -100,10 +100,10 @@ bool ConfigurationPolicyProviderWin::GetRegistryPolicyStringList( string16 path = string16(policy::kRegistrySubKey); path += ASCIIToUTF16("\\") + key; RegKey policy_key; - if (!policy_key.Open(HKEY_LOCAL_MACHINE, path.c_str())) { + if (!policy_key.Open(HKEY_LOCAL_MACHINE, path.c_str(), KEY_READ)) { policy_key.Close(); // Fall back on user-specific policy. - if (!policy_key.Open(HKEY_CURRENT_USER, path.c_str())) + if (!policy_key.Open(HKEY_CURRENT_USER, path.c_str(), KEY_READ)) return false; } string16 policy_string; |