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

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

Issue 2621923002: Product cleanups in the wake of multi-install removal. (Closed)
Patch Set: sync to position 442831 Created 3 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 unified diff | Download patch
« no previous file with comments | « chrome/installer/util/chrome_browser_sxs_operations.cc ('k') | chrome/installer/util/product.h » ('j') | 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/google_update_util.h" 5 #include "chrome/installer/util/google_update_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 return; 157 return;
158 base::FilePath exe_path(product_state.GetSetupPath()); 158 base::FilePath exe_path(product_state.GetSetupPath());
159 if (exe_path.empty() || !base::PathExists(exe_path)) { 159 if (exe_path.empty() || !base::PathExists(exe_path)) {
160 LOG(ERROR) << "Could not find setup.exe to reenable updates."; 160 LOG(ERROR) << "Could not find setup.exe to reenable updates.";
161 return; 161 return;
162 } 162 }
163 163
164 base::CommandLine cmd(exe_path); 164 base::CommandLine cmd(exe_path);
165 cmd.AppendSwitch(installer::switches::kReenableAutoupdates); 165 cmd.AppendSwitch(installer::switches::kReenableAutoupdates);
166 installer::Product product(BrowserDistribution::GetDistribution()); 166 installer::Product product(BrowserDistribution::GetDistribution());
167 product.InitializeFromUninstallCommand(product_state.uninstall_command());
168 product.AppendProductFlags(&cmd); 167 product.AppendProductFlags(&cmd);
169 if (system_install) 168 if (system_install)
170 cmd.AppendSwitch(installer::switches::kSystemLevel); 169 cmd.AppendSwitch(installer::switches::kSystemLevel);
171 if (product_state.uninstall_command().HasSwitch( 170 if (product_state.uninstall_command().HasSwitch(
172 installer::switches::kVerboseLogging)) { 171 installer::switches::kVerboseLogging)) {
173 cmd.AppendSwitch(installer::switches::kVerboseLogging); 172 cmd.AppendSwitch(installer::switches::kVerboseLogging);
174 } 173 }
175 174
176 base::LaunchOptions launch_options; 175 base::LaunchOptions launch_options;
177 launch_options.force_breakaway_from_job_ = true; 176 launch_options.force_breakaway_from_job_ = true;
178 177
179 if (base::win::UserAccountControlIsEnabled()) 178 if (base::win::UserAccountControlIsEnabled())
180 base::LaunchElevatedProcess(cmd, launch_options); 179 base::LaunchElevatedProcess(cmd, launch_options);
181 else 180 else
182 base::LaunchProcess(cmd, launch_options); 181 base::LaunchProcess(cmd, launch_options);
183 } 182 }
184 183
185 } // namespace google_update 184 } // namespace google_update
OLDNEW
« no previous file with comments | « chrome/installer/util/chrome_browser_sxs_operations.cc ('k') | chrome/installer/util/product.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698