Chromium Code Reviews| 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()); |