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

Side by Side Diff: chrome/installer/setup/install.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/chrome_installer.gypi ('k') | chrome/installer/setup/install_worker.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/setup/install.h" 5 #include "chrome/installer/setup/install.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #include <time.h> 9 #include <time.h>
10 10
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 // NOTE: Should the work done here, on Active Setup, change: 749 // NOTE: Should the work done here, on Active Setup, change:
750 // kActiveSetupMajorVersion in update_active_setup_version_work_item.cc needs to 750 // kActiveSetupMajorVersion in update_active_setup_version_work_item.cc needs to
751 // be increased for Active Setup to invoke this again for all users of this 751 // be increased for Active Setup to invoke this again for all users of this
752 // install. It may also be invoked again when a system-level chrome install goes 752 // install. It may also be invoked again when a system-level chrome install goes
753 // through an OS upgrade. 753 // through an OS upgrade.
754 void HandleActiveSetupForBrowser(const base::FilePath& installation_root, 754 void HandleActiveSetupForBrowser(const base::FilePath& installation_root,
755 const installer::Product& chrome, 755 const installer::Product& chrome,
756 bool force) { 756 bool force) {
757 DCHECK(chrome.is_chrome()); 757 DCHECK(chrome.is_chrome());
758 758
759 std::unique_ptr<WorkItemList> cleanup_list(WorkItem::CreateWorkItemList()); 759 NoRollbackWorkItemList cleanup_list;
760 cleanup_list->set_log_message("Cleanup deprecated per-user registrations"); 760 AddCleanupDeprecatedPerUserRegistrationsWorkItems(chrome, &cleanup_list);
761 cleanup_list->set_rollback_enabled(false); 761 cleanup_list.Do();
762 cleanup_list->set_best_effort(true);
763 AddCleanupDeprecatedPerUserRegistrationsWorkItems(chrome, cleanup_list.get());
764 cleanup_list->Do();
765 762
766 // Only create shortcuts on Active Setup if the first run sentinel is not 763 // Only create shortcuts on Active Setup if the first run sentinel is not
767 // present for this user (as some shortcuts used to be installed on first 764 // present for this user (as some shortcuts used to be installed on first
768 // run and this could otherwise re-install shortcuts for users that have 765 // run and this could otherwise re-install shortcuts for users that have
769 // already deleted them in the past). 766 // already deleted them in the past).
770 // Decide whether to create the shortcuts or simply replace existing 767 // Decide whether to create the shortcuts or simply replace existing
771 // shortcuts; if the decision is to create them, only shortcuts whose matching 768 // shortcuts; if the decision is to create them, only shortcuts whose matching
772 // all-users shortcut isn't present on the system will be created. 769 // all-users shortcut isn't present on the system will be created.
773 InstallShortcutOperation install_operation = 770 InstallShortcutOperation install_operation =
774 (!force && InstallUtil::IsFirstRunSentinelPresent()) 771 (!force && InstallUtil::IsFirstRunSentinelPresent())
775 ? INSTALL_SHORTCUT_REPLACE_EXISTING 772 ? INSTALL_SHORTCUT_REPLACE_EXISTING
776 : INSTALL_SHORTCUT_CREATE_EACH_IF_NO_SYSTEM_LEVEL; 773 : INSTALL_SHORTCUT_CREATE_EACH_IF_NO_SYSTEM_LEVEL;
777 774
778 // Read master_preferences copied beside chrome.exe at install. 775 // Read master_preferences copied beside chrome.exe at install.
779 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); 776 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs));
780 base::FilePath chrome_exe(installation_root.Append(kChromeExe)); 777 base::FilePath chrome_exe(installation_root.Append(kChromeExe));
781 CreateOrUpdateShortcuts( 778 CreateOrUpdateShortcuts(
782 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); 779 chrome_exe, chrome, prefs, CURRENT_USER, install_operation);
783 780
784 UpdateDefaultBrowserBeaconForPath(chrome_exe); 781 UpdateDefaultBrowserBeaconForPath(chrome_exe);
785 } 782 }
786 783
787 } // namespace installer 784 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/chrome_installer.gypi ('k') | chrome/installer/setup/install_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698