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

Unified Diff: webkit/plugins/npapi/plugin_list_win.cc

Issue 6090006: Regkey functions return error code instead of bool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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: webkit/plugins/npapi/plugin_list_win.cc
===================================================================
--- webkit/plugins/npapi/plugin_list_win.cc (revision 71561)
+++ webkit/plugins/npapi/plugin_list_win.cc (working copy)
@@ -73,7 +73,7 @@
base::win::RegKey key(HKEY_LOCAL_MACHINE, reg_path.c_str(), KEY_READ);
std::wstring path;
- if (key.ReadValue(kRegistryPath, &path)) {
+ if (key.ReadValue(kRegistryPath, &path) == ERROR_SUCCESS) {
*out = FilePath(path);
return true;
}
@@ -95,7 +95,7 @@
base::win::RegKey key(root_key, reg_path.c_str(), KEY_READ);
std::wstring path;
- if (key.ReadValue(kRegistryPath, &path))
+ if (key.ReadValue(kRegistryPath, &path) == ERROR_SUCCESS)
plugin_dirs->insert(FilePath(path));
}
}
@@ -110,7 +110,7 @@
it.Name() + L"\\Main";
base::win::RegKey key(HKEY_LOCAL_MACHINE, full_path.c_str(), KEY_READ);
std::wstring install_dir;
- if (!key.ReadValue(L"Install Directory", &install_dir))
+ if (key.ReadValue(L"Install Directory", &install_dir) != ERROR_SUCCESS)
continue;
out->push_back(FilePath(install_dir));
}
@@ -190,7 +190,8 @@
// 2. Read the current Java version
std::wstring java_version;
- if (!java_key.ReadValue(kRegistryBrowserJavaVersion, &java_version))
+ if (java_key.ReadValue(kRegistryBrowserJavaVersion, &java_version)
+ != ERROR_SUCCESS)
grt (UTC plus 2) 2011/01/16 04:19:48 Wrapping
amit 2011/01/16 07:54:28 Done.
java_key.ReadValue(kRegistryCurrentJavaVersion, &java_version);
if (!java_version.empty()) {
@@ -199,7 +200,8 @@
// 3. Install path of the JRE binaries is specified in "JavaHome"
// value under the Java version key.
std::wstring java_plugin_directory;
- if (java_key.ReadValue(kRegistryJavaHome, &java_plugin_directory)) {
+ if (java_key.ReadValue(kRegistryJavaHome, &java_plugin_directory)
+ == ERROR_SUCCESS) {
grt (UTC plus 2) 2011/01/16 04:19:48 Wrapping
// 4. The new plugin resides under the 'bin/new_plugin'
// subdirectory.
DCHECK(!java_plugin_directory.empty());

Powered by Google App Engine
This is Rietveld 408576698