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

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 71561)
+++ 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) {
grt (UTC plus 2) 2011/01/16 04:19:48 Wrapping
amit 2011/01/16 07:54:28 Done.
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)) {
grt (UTC plus 2) 2011/01/16 04:19:48 Wrapping (plus extra parens around the first part?
amit 2011/01/16 07:54:28 Done.
channel_.set_value(std::wstring());
}
}

Powered by Google App Engine
This is Rietveld 408576698