Commit 06983b3f authored by grt's avatar grt Committed by Commit bot

Silence logging at uninstall if the ClientState key doesn't exist.

BUG=none

Review URL: https://codereview.chromium.org/551783003

Cr-Commit-Position: refs/heads/master@{#293829}
parent b09a5e56
...@@ -117,16 +117,18 @@ bool Product::SetMsiMarker(bool system_install, bool set) const { ...@@ -117,16 +117,18 @@ bool Product::SetMsiMarker(bool system_install, bool set) const {
RegKey client_state_key; RegKey client_state_key;
LONG result = client_state_key.Open(reg_root, LONG result = client_state_key.Open(reg_root,
distribution_->GetStateKey().c_str(), distribution_->GetStateKey().c_str(),
KEY_READ | KEY_WRITE | KEY_WOW64_32KEY); KEY_SET_VALUE | KEY_WOW64_32KEY);
if (result == ERROR_SUCCESS) { if (result == ERROR_SUCCESS) {
result = client_state_key.WriteValue(google_update::kRegMSIField, result = client_state_key.WriteValue(google_update::kRegMSIField,
set ? 1 : 0); set ? 1 : 0);
} }
if (result != ERROR_SUCCESS && result != ERROR_FILE_NOT_FOUND) {
LOG_IF(ERROR, result != ERROR_SUCCESS) << "Failed to Open or Write MSI value" LOG(ERROR)
"to client state key. error: " << result; << "Failed to Open or Write MSI value to client state key. error: "
<< result;
return (result == ERROR_SUCCESS); return false;
}
return true;
} }
bool Product::ShouldCreateUninstallEntry() const { bool Product::ShouldCreateUninstallEntry() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment