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

Side by Side 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: logic flip 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/installer/util/product.h" 5 #include "chrome/installer/util/product.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 return success; 112 return success;
113 } 113 }
114 114
115 bool Product::SetMsiMarker(bool system_install, bool set) const { 115 bool Product::SetMsiMarker(bool system_install, bool set) const {
116 HKEY reg_root = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; 116 HKEY reg_root = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
117 RegKey client_state_key; 117 RegKey client_state_key;
118 LONG result = client_state_key.Open(reg_root, 118 LONG result = client_state_key.Open(reg_root,
119 distribution_->GetStateKey().c_str(), 119 distribution_->GetStateKey().c_str(),
120 KEY_READ | KEY_WRITE | KEY_WOW64_32KEY); 120 KEY_SET_VALUE | KEY_WOW64_32KEY);
121 if (result == ERROR_SUCCESS) { 121 if (result == ERROR_SUCCESS) {
122 result = client_state_key.WriteValue(google_update::kRegMSIField, 122 result = client_state_key.WriteValue(google_update::kRegMSIField,
123 set ? 1 : 0); 123 set ? 1 : 0);
124 } 124 }
125 125 if (result != ERROR_SUCCESS && result != ERROR_FILE_NOT_FOUND) {
126 LOG_IF(ERROR, result != ERROR_SUCCESS) << "Failed to Open or Write MSI value" 126 LOG(ERROR)
127 "to client state key. error: " << result; 127 << "Failed to Open or Write MSI value to client state key. error: "
128 128 << result;
129 return (result == ERROR_SUCCESS); 129 return false;
130 }
131 return true;
130 } 132 }
131 133
132 bool Product::ShouldCreateUninstallEntry() const { 134 bool Product::ShouldCreateUninstallEntry() const {
133 return operations_->ShouldCreateUninstallEntry(options_); 135 return operations_->ShouldCreateUninstallEntry(options_);
134 } 136 }
135 137
136 void Product::AddKeyFiles(std::vector<base::FilePath>* key_files) const { 138 void Product::AddKeyFiles(std::vector<base::FilePath>* key_files) const {
137 operations_->AddKeyFiles(options_, key_files); 139 operations_->AddKeyFiles(options_, key_files);
138 } 140 }
139 141
(...skipping 26 matching lines...) Expand all
166 if (distribution_->HasUserExperiments()) { 168 if (distribution_->HasUserExperiments()) {
167 VLOG(1) << "LaunchUserExperiment status: " << status << " product: " 169 VLOG(1) << "LaunchUserExperiment status: " << status << " product: "
168 << distribution_->GetDisplayName() 170 << distribution_->GetDisplayName()
169 << " system_level: " << system_level; 171 << " system_level: " << system_level;
170 operations_->LaunchUserExperiment( 172 operations_->LaunchUserExperiment(
171 setup_path, options_, status, system_level); 173 setup_path, options_, status, system_level);
172 } 174 }
173 } 175 }
174 176
175 } // namespace installer 177 } // namespace installer
OLDNEW
« 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