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

Unified Diff: chrome/installer/util/product.cc

Issue 551783003: Silence logging at uninstall if the ClientState key doesn't exist. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/product.cc
diff --git a/chrome/installer/util/product.cc b/chrome/installer/util/product.cc
index c7f1b8f49d5a17de785074e9ff759ceb6eacd5dd..ae1157296ac52733e7e005d0e192d9458a745d81 100644
--- a/chrome/installer/util/product.cc
+++ b/chrome/installer/util/product.cc
@@ -117,16 +117,18 @@ bool Product::SetMsiMarker(bool system_install, bool set) const {
RegKey client_state_key;
LONG result = client_state_key.Open(reg_root,
distribution_->GetStateKey().c_str(),
- KEY_READ | KEY_WRITE | KEY_WOW64_32KEY);
+ KEY_SET_VALUE | KEY_WOW64_32KEY);
if (result == ERROR_SUCCESS) {
result = client_state_key.WriteValue(google_update::kRegMSIField,
set ? 1 : 0);
}
- LOG_IF(ERROR, result != ERROR_SUCCESS) << "Failed to Open or Write MSI value"
- "to client state key. error: " << result;
+ if (result == ERROR_SUCCESS || result == ERROR_FILE_NOT_FOUND)
gab 2014/09/08 16:29:58 nit: I'd prefer handling the error in scope and ha
grt (UTC plus 2) 2014/09/08 16:47:56 yeah. my urge to avoid braces made me do it this w
gab 2014/09/08 16:58:41 Mildly. I don't think having to add braces matters
grt (UTC plus 2) 2014/09/08 17:03:29 Done.
+ return true;
- return (result == ERROR_SUCCESS);
+ LOG(ERROR) << "Failed to Open or Write MSI value to client state key. error: "
+ << result;
+ return false;
}
bool Product::ShouldCreateUninstallEntry() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698