Index: chrome/installer/util/shell_util.cc |
=================================================================== |
--- chrome/installer/util/shell_util.cc (revision 71345) |
+++ chrome/installer/util/shell_util.cc (working copy) |
@@ -200,13 +200,13 @@ |
bool found = false; |
if (_is_string) { |
std::wstring read_value; |
- found = (key.ReadValue(_name.c_str(), &read_value)) && |
+ found = (key.ReadValue(_name.c_str(), &read_value) == ERROR_SUCCESS) && |
(read_value.size() == _value.size()) && |
(std::equal(_value.begin(), _value.end(), read_value.begin(), |
base::CaseInsensitiveCompare<wchar_t>())); |
} else { |
DWORD read_value; |
- found = key.ReadValueDW(_name.c_str(), &read_value) && |
+ found = (key.ReadValueDW(_name.c_str(), &read_value) == ERROR_SUCCESS) && |
read_value == _int_value; |
grt (UTC plus 2)
2011/01/14 15:53:43
For consistency, this should have parens, no?
amit
2011/01/15 01:28:11
Done.
|
} |
key.Close(); |
@@ -220,10 +220,10 @@ |
bool found = false; |
if (_is_string) { |
std::wstring read_value; |
- found = key.ReadValue(_name.c_str(), &read_value); |
+ found = key.ReadValue(_name.c_str(), &read_value) == ERROR_SUCCESS; |
} else { |
DWORD read_value; |
- found = key.ReadValueDW(_name.c_str(), &read_value); |
+ found = key.ReadValueDW(_name.c_str(), &read_value) == ERROR_SUCCESS; |
} |
key.Close(); |
return found; |
@@ -356,7 +356,7 @@ |
reg_key.append(L"\\" + dist->GetApplicationName() + ShellUtil::kRegShellOpen); |
RegKey key(HKEY_LOCAL_MACHINE, reg_key.c_str(), KEY_READ); |
std::wstring registry_chrome_exe; |
- if (!key.ReadValue(L"", ®istry_chrome_exe) || |
+ if ((key.ReadValue(L"", ®istry_chrome_exe) != ERROR_SUCCESS) || |
registry_chrome_exe.length() < 2) |
return false; |
@@ -583,15 +583,16 @@ |
RegKey capabilities(root, (key + L"\\Capabilities").c_str(), KEY_READ); |
std::wstring name; |
if (!capabilities.Valid() || |
- !capabilities.ReadValue(L"ApplicationName", &name)) { |
+ capabilities.ReadValue(L"ApplicationName", &name) != ERROR_SUCCESS) { |
RegKey base_key(root, key.c_str(), KEY_READ); |
- if (!base_key.ReadValue(L"", &name)) |
+ if (base_key.ReadValue(L"", &name) != ERROR_SUCCESS) |
continue; |
} |
RegKey install_info(root, (key + L"\\InstallInfo").c_str(), KEY_READ); |
std::wstring command; |
if (!install_info.Valid() || |
- !install_info.ReadValue(L"ReinstallCommand", &command)) |
+ (install_info.ReadValue(L"ReinstallCommand", |
+ &command) != ERROR_SUCCESS)) |
continue; |
if (!name.empty() && !command.empty() && |
name.find(dist->GetApplicationName()) == std::wstring::npos) |