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

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

Issue 10829298: Allow invocation of --multi-install without a product if App Host needs binaries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | 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/installer_state.h" 5 #include "chrome/installer/util/installer_state.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 operation_ = SINGLE_INSTALL_OR_UPDATE; 248 operation_ = SINGLE_INSTALL_OR_UPDATE;
249 } else if (IsMultiInstallUpdate(prefs, machine_state)) { 249 } else if (IsMultiInstallUpdate(prefs, machine_state)) {
250 // Updates driven by Google Update take place under the multi-installer's 250 // Updates driven by Google Update take place under the multi-installer's
251 // app guid. 251 // app guid.
252 operand = multi_package_distribution_; 252 operand = multi_package_distribution_;
253 operation_ = MULTI_UPDATE; 253 operation_ = MULTI_UPDATE;
254 } else { 254 } else {
255 operation_ = MULTI_INSTALL; 255 operation_ = MULTI_INSTALL;
256 } 256 }
257 257
258 // Initial, over, and un-installs will always take place under one of the 258 // Initial, over, and un-installs will take place under one of the
259 // product app guids (Chrome, Chrome Frame, or App Host, in order of 259 // product app guids (Chrome, Chrome Frame, App Host, or Binaries, in order of
260 // preference). 260 // preference).
261 if (operand == NULL) { 261 if (operand == NULL) {
262 BrowserDistribution::Type operand_distribution_type = 262 BrowserDistribution::Type operand_distribution_type =
263 BrowserDistribution::CHROME_BINARIES; 263 BrowserDistribution::CHROME_BINARIES;
264 if (prefs.install_chrome()) 264 if (prefs.install_chrome())
265 operand_distribution_type = BrowserDistribution::CHROME_BROWSER; 265 operand_distribution_type = BrowserDistribution::CHROME_BROWSER;
266 else if (prefs.install_chrome_frame()) 266 else if (prefs.install_chrome_frame())
267 operand_distribution_type = BrowserDistribution::CHROME_FRAME; 267 operand_distribution_type = BrowserDistribution::CHROME_FRAME;
268 else if (prefs.install_chrome_app_host()) 268 else if (prefs.install_chrome_app_host())
269 operand_distribution_type = BrowserDistribution::CHROME_APP_HOST; 269 operand_distribution_type = BrowserDistribution::CHROME_APP_HOST;
270 else
271 NOTREACHED();
272 270
273 operand = BrowserDistribution::GetSpecificDistribution( 271 operand = BrowserDistribution::GetSpecificDistribution(
274 operand_distribution_type); 272 operand_distribution_type);
275 } 273 }
276 274
277 state_key_ = operand->GetStateKey(); 275 state_key_ = operand->GetStateKey();
278 state_type_ = operand->GetType(); 276 state_type_ = operand->GetType();
279 277
280 // Parse --critical-update-version=W.X.Y.Z 278 // Parse --critical-update-version=W.X.Y.Z
281 std::string critical_version_value( 279 std::string critical_version_value(
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 if (is_multi_install()) { 735 if (is_multi_install()) {
738 InstallUtil::AddInstallerResultItems( 736 InstallUtil::AddInstallerResultItems(
739 system_install, multi_package_binaries_distribution()->GetStateKey(), 737 system_install, multi_package_binaries_distribution()->GetStateKey(),
740 status, string_resource_id, launch_cmd, install_list.get()); 738 status, string_resource_id, launch_cmd, install_list.get());
741 } 739 }
742 if (!install_list->Do()) 740 if (!install_list->Do())
743 LOG(ERROR) << "Failed to record installer error information in registry."; 741 LOG(ERROR) << "Failed to record installer error information in registry.";
744 } 742 }
745 743
746 } // namespace installer 744 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698