| OLD | NEW |
| 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 Loading... |
| 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( | 674 std::unique_ptr<WorkItemList> install_list(WorkItem::CreateWorkItemList()); |
| 675 WorkItem::CreateNoRollbackWorkItemList()); | 675 install_list->set_log_message("Write Installer Result"); |
| 676 install_list->set_best_effort(true); |
| 677 install_list->set_rollback_enabled(false); |
| 676 const bool system_install = this->system_install(); | 678 const bool system_install = this->system_install(); |
| 677 // Write the value for all products upon which we're operating. | 679 // Write the value for all products upon which we're operating. |
| 678 Products::const_iterator end = products().end(); | 680 Products::const_iterator end = products().end(); |
| 679 for (Products::const_iterator scan = products().begin(); scan != end; | 681 for (Products::const_iterator scan = products().begin(); scan != end; |
| 680 ++scan) { | 682 ++scan) { |
| 681 InstallUtil::AddInstallerResultItems( | 683 InstallUtil::AddInstallerResultItems( |
| 682 system_install, (*scan)->distribution()->GetStateKey(), status, | 684 system_install, (*scan)->distribution()->GetStateKey(), status, |
| 683 string_resource_id, launch_cmd, install_list.get()); | 685 string_resource_id, launch_cmd, install_list.get()); |
| 684 } | 686 } |
| 685 // And for the binaries if this is a multi-install. | 687 // And for the binaries if this is a multi-install. |
| 686 if (is_multi_install()) { | 688 if (is_multi_install()) { |
| 687 InstallUtil::AddInstallerResultItems( | 689 InstallUtil::AddInstallerResultItems( |
| 688 system_install, multi_package_binaries_distribution()->GetStateKey(), | 690 system_install, multi_package_binaries_distribution()->GetStateKey(), |
| 689 status, string_resource_id, launch_cmd, install_list.get()); | 691 status, string_resource_id, launch_cmd, install_list.get()); |
| 690 } | 692 } |
| 691 if (!install_list->Do()) | 693 install_list->Do(); |
| 692 LOG(ERROR) << "Failed to record installer error information in registry."; | |
| 693 } | 694 } |
| 694 | 695 |
| 695 bool InstallerState::RequiresActiveSetup() const { | 696 bool InstallerState::RequiresActiveSetup() const { |
| 696 return system_install() && FindProduct(BrowserDistribution::CHROME_BROWSER); | 697 return system_install() && FindProduct(BrowserDistribution::CHROME_BROWSER); |
| 697 } | 698 } |
| 698 | 699 |
| 699 } // namespace installer | 700 } // namespace installer |
| OLD | NEW |