Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8771)

Unified Diff: chrome_frame/test/chrome_frame_test_utils.cc

Issue 3172009: Cleanup Registry API: part 3. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: chrome fixes Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome_frame/test/chrome_frame_test_utils.cc
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc
index 5f59f6cc7086e73ac153c5f55420b8b46433f3cf..6e40b281bc3225b6c86643efe23c216276c01c65 100644
--- a/chrome_frame/test/chrome_frame_test_utils.cc
+++ b/chrome_frame/test/chrome_frame_test_utils.cc
@@ -118,7 +118,7 @@ std::wstring GetExecutableAppPath(const std::wstring& file) {
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\";
std::wstring app_path;
- RegKey key(HKEY_LOCAL_MACHINE, (kAppPathsKey + file).c_str());
+ RegKey key(HKEY_LOCAL_MACHINE, (kAppPathsKey + file).c_str(), KEY_READ);
if (key.Handle()) {
key.ReadValue(NULL, &app_path);
}
@@ -130,7 +130,7 @@ std::wstring FormatCommandForApp(const std::wstring& exe_name,
const std::wstring& argument) {
std::wstring reg_path(StringPrintf(L"Applications\\%ls\\shell\\open\\command",
exe_name.c_str()));
- RegKey key(HKEY_CLASSES_ROOT, reg_path.c_str());
+ RegKey key(HKEY_CLASSES_ROOT, reg_path.c_str(), KEY_READ);
std::wstring command;
if (key.Handle()) {
« no previous file with comments | « chrome/test/mini_installer_test/chrome_mini_installer.cc ('k') | chrome_frame/test/perf/chrome_frame_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698