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

Side by Side Diff: chrome/installer/util/google_update_util.cc

Issue 12208135: Prevent --ensure-google-update-present switch from blocking install if Google Update is missing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Specifically make the "Google Update is absent" case non-errornous. Created 7 years, 10 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
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/google_update_util.h" 5 #include "chrome/installer/util/google_update_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 bool EnsureUserLevelGoogleUpdatePresent() { 173 bool EnsureUserLevelGoogleUpdatePresent() {
174 LOG(INFO) << "Ensuring Google Update is present at user-level."; 174 LOG(INFO) << "Ensuring Google Update is present at user-level.";
175 175
176 bool success = false; 176 bool success = false;
177 if (IsGoogleUpdatePresent(false)) { 177 if (IsGoogleUpdatePresent(false)) {
178 success = true; 178 success = true;
179 } else { 179 } else {
180 string16 cmd_string; 180 string16 cmd_string;
181 if (!GetUserLevelGoogleUpdateInstallCommandLine(&cmd_string)) { 181 if (!GetUserLevelGoogleUpdateInstallCommandLine(&cmd_string)) {
182 LOG(ERROR) << "Cannot find Google Update at system-level."; 182 LOG(ERROR) << "Cannot find Google Update at system-level.";
183 // Ideally we should return false. However, this case should not be
184 // encountered by regular users, and developers (who often installs
185 // Chrome without Google Update) may be unduly impeded by this case.
186 // Therefore we return true.
187 return true;
grt (UTC plus 2) 2013/02/13 14:22:49 success = true; for consistency since this functio
huangs 2013/02/13 15:35:28 Done.
183 } else { 188 } else {
184 success = LaunchProcessAndWaitWithTimeout(cmd_string, 189 success = LaunchProcessAndWaitWithTimeout(cmd_string,
185 base::TimeDelta::FromMilliseconds(INFINITE)); 190 base::TimeDelta::FromMilliseconds(INFINITE));
186 } 191 }
187 } 192 }
188 return success; 193 return success;
189 } 194 }
190 195
191 bool UninstallGoogleUpdate(bool system_install) { 196 bool UninstallGoogleUpdate(bool system_install) {
192 bool success = false; 197 bool success = false;
(...skipping 14 matching lines...) Expand all
207 std::map<std::string, std::string>::const_iterator data_it( 212 std::map<std::string, std::string>::const_iterator data_it(
208 untrusted_data.find(key)); 213 untrusted_data.find(key));
209 if (data_it != untrusted_data.end()) 214 if (data_it != untrusted_data.end())
210 return data_it->second; 215 return data_it->second;
211 } 216 }
212 217
213 return std::string(); 218 return std::string();
214 } 219 }
215 220
216 } // namespace google_update 221 } // namespace google_update
OLDNEW
« chrome/installer/util/google_update_util.h ('K') | « chrome/installer/util/google_update_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698