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

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

Issue 1976443005: Revert of Add best-effort/allow rollback flags on WorkItem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simple_list_tests
Patch Set: Created 4 years, 7 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/install_util.cc ('k') | chrome/installer/util/move_tree_work_item.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/installer_state.h" 5 #include "chrome/installer/util/installer_state.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <functional> 10 #include <functional>
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 LOG(ERROR) << "Failed opening key " << state_key_ 664 LOG(ERROR) << "Failed opening key " << state_key_
665 << " to update app channels; result: " << result; 665 << " to update app channels; result: " << result;
666 } 666 }
667 } 667 }
668 668
669 void InstallerState::WriteInstallerResult( 669 void InstallerState::WriteInstallerResult(
670 InstallStatus status, 670 InstallStatus status,
671 int string_resource_id, 671 int string_resource_id,
672 const std::wstring* const launch_cmd) const { 672 const std::wstring* const launch_cmd) const {
673 // Use a no-rollback list since this is a best-effort deal. 673 // Use a no-rollback list since this is a best-effort deal.
674 std::unique_ptr<WorkItemList> install_list(WorkItem::CreateWorkItemList()); 674 std::unique_ptr<WorkItemList> install_list(
675 install_list->set_log_message("Write Installer Result"); 675 WorkItem::CreateNoRollbackWorkItemList());
676 install_list->set_best_effort(true);
677 install_list->set_rollback_enabled(false);
678 const bool system_install = this->system_install(); 676 const bool system_install = this->system_install();
679 // Write the value for all products upon which we're operating. 677 // Write the value for all products upon which we're operating.
680 Products::const_iterator end = products().end(); 678 Products::const_iterator end = products().end();
681 for (Products::const_iterator scan = products().begin(); scan != end; 679 for (Products::const_iterator scan = products().begin(); scan != end;
682 ++scan) { 680 ++scan) {
683 InstallUtil::AddInstallerResultItems( 681 InstallUtil::AddInstallerResultItems(
684 system_install, (*scan)->distribution()->GetStateKey(), status, 682 system_install, (*scan)->distribution()->GetStateKey(), status,
685 string_resource_id, launch_cmd, install_list.get()); 683 string_resource_id, launch_cmd, install_list.get());
686 } 684 }
687 // And for the binaries if this is a multi-install. 685 // And for the binaries if this is a multi-install.
688 if (is_multi_install()) { 686 if (is_multi_install()) {
689 InstallUtil::AddInstallerResultItems( 687 InstallUtil::AddInstallerResultItems(
690 system_install, multi_package_binaries_distribution()->GetStateKey(), 688 system_install, multi_package_binaries_distribution()->GetStateKey(),
691 status, string_resource_id, launch_cmd, install_list.get()); 689 status, string_resource_id, launch_cmd, install_list.get());
692 } 690 }
693 install_list->Do(); 691 if (!install_list->Do())
692 LOG(ERROR) << "Failed to record installer error information in registry.";
694 } 693 }
695 694
696 bool InstallerState::RequiresActiveSetup() const { 695 bool InstallerState::RequiresActiveSetup() const {
697 return system_install() && FindProduct(BrowserDistribution::CHROME_BROWSER); 696 return system_install() && FindProduct(BrowserDistribution::CHROME_BROWSER);
698 } 697 }
699 698
700 } // namespace installer 699 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/install_util.cc ('k') | chrome/installer/util/move_tree_work_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698