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

Unified Diff: chrome/installer/util/installation_state.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: chrome/installer/util/installation_state.cc
===================================================================
--- chrome/installer/util/installation_state.cc (revision 71761)
+++ chrome/installer/util/installation_state.cc (working copy)
@@ -22,13 +22,14 @@
const HKEY root_key = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
base::win::RegKey key(root_key, version_key.c_str(), KEY_QUERY_VALUE);
std::wstring version_str;
- if (key.ReadValue(google_update::kRegVersionField, &version_str)) {
+ if (key.ReadValue(google_update::kRegVersionField, &version_str)
+ == ERROR_SUCCESS) {
version_.reset(Version::GetVersionFromString(WideToASCII(version_str)));
if (version_.get() != NULL) {
// The product is installed. Check for the channel value (absent if not
// installed/managed by Google Update).
- if (!key.Open(root_key, state_key.c_str(), KEY_QUERY_VALUE) ||
- !channel_.Initialize(key)) {
+ if ((key.Open(root_key, state_key.c_str(), KEY_QUERY_VALUE) !=
+ ERROR_SUCCESS) || !channel_.Initialize(key)) {
channel_.set_value(std::wstring());
}
}
« no previous file with comments | « chrome/installer/util/install_util_unittest.cc ('k') | chrome/installer/util/package_properties_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698