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

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
« no previous file with comments | « net/proxy/proxy_config_service_win.cc ('k') | webkit/plugins/npapi/webplugin_delegate_impl_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/plugin_list_win.cc
===================================================================
--- webkit/plugins/npapi/plugin_list_win.cc (revision 71761)
+++ 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,8 +190,10 @@
// 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) {
java_key.ReadValue(kRegistryCurrentJavaVersion, &java_version);
+ }
if (!java_version.empty()) {
java_key.OpenKey(java_version.c_str(), KEY_QUERY_VALUE);
@@ -199,7 +201,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) {
// 4. The new plugin resides under the 'bin/new_plugin'
// subdirectory.
DCHECK(!java_plugin_directory.empty());
« no previous file with comments | « net/proxy/proxy_config_service_win.cc ('k') | webkit/plugins/npapi/webplugin_delegate_impl_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698