diff options
-rw-r--r-- | base/registry.h | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_rlz_apitest.cc | 6 | ||||
-rw-r--r-- | chrome/browser/extensions/external_registry_extension_provider_win.cc | 4 | ||||
-rw-r--r-- | chrome/browser/platform_util_win.cc | 2 | ||||
-rw-r--r-- | chrome/browser/policy/configuration_policy_provider_win.cc | 2 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_win.cc | 3 |
6 files changed, 11 insertions, 8 deletions
diff --git a/base/registry.h b/base/registry.h index 6199362..0b6c00c 100644 --- a/base/registry.h +++ b/base/registry.h @@ -29,7 +29,7 @@ class RegKey { bool CreateWithDisposition(HKEY rootkey, const wchar_t* subkey, DWORD* disposition, REGSAM access); - bool Open(HKEY rootkey, const wchar_t* subkey, REGSAM access = KEY_READ); + bool Open(HKEY rootkey, const wchar_t* subkey, REGSAM access); // Creates a subkey or open it if it already exists. bool CreateKey(const wchar_t* name, REGSAM access); 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 5157cb4..d928a2d 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..e69b8d4 100644 --- a/chrome/browser/policy/configuration_policy_provider_win.cc +++ b/chrome/browser/policy/configuration_policy_provider_win.cc @@ -62,7 +62,7 @@ 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(); diff --git a/webkit/glue/plugins/webplugin_delegate_impl_win.cc b/webkit/glue/plugins/webplugin_delegate_impl_win.cc index df75cc0..7a2e314 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_win.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl_win.cc @@ -412,7 +412,8 @@ bool WebPluginDelegateImpl::PlatformInitialize() { if ((quirks_ & PLUGIN_QUIRK_PATCH_REGENUMKEYEXW) && win_util::GetWinVersion() == win_util::WINVERSION_XP && !RegKey().Open(HKEY_LOCAL_MACHINE, - L"SOFTWARE\\Microsoft\\MediaPlayer\\ShimInclusionList\\chrome.exe") && + L"SOFTWARE\\Microsoft\\MediaPlayer\\ShimInclusionList\\chrome.exe", + KEY_READ) && !g_iat_patch_reg_enum_key_ex_w.Pointer()->is_patched()) { g_iat_patch_reg_enum_key_ex_w.Pointer()->Patch( L"wmpdxm.dll", "advapi32.dll", "RegEnumKeyExW", |