| 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 // This file defines the methods useful for uninstalling Chrome. | 5 // This file defines the methods useful for uninstalling Chrome. |
| 6 | 6 |
| 7 #include "chrome/installer/setup/uninstall.h" | 7 #include "chrome/installer/setup/uninstall.h" |
| 8 | 8 |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 | 10 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 update_list.get()); | 149 update_list.get()); |
| 150 bool success = update_list->Do(); | 150 bool success = update_list->Do(); |
| 151 LOG_IF(ERROR, !success) << "Failed updating channel values."; | 151 LOG_IF(ERROR, !success) << "Failed updating channel values."; |
| 152 } | 152 } |
| 153 } | 153 } |
| 154 | 154 |
| 155 void ProcessOnOsUpgradeWorkItems(const InstallerState& installer_state, | 155 void ProcessOnOsUpgradeWorkItems(const InstallerState& installer_state, |
| 156 const Product& product) { | 156 const Product& product) { |
| 157 scoped_ptr<WorkItemList> work_item_list( | 157 scoped_ptr<WorkItemList> work_item_list( |
| 158 WorkItem::CreateNoRollbackWorkItemList()); | 158 WorkItem::CreateNoRollbackWorkItemList()); |
| 159 AddOsUpgradeWorkItems(installer_state, base::FilePath(), base::Version(), | 159 AddOsUpgradeWorkItems(installer_state, base::FilePath(), Version(), product, |
| 160 product, work_item_list.get()); | 160 work_item_list.get()); |
| 161 if (!work_item_list->Do()) | 161 if (!work_item_list->Do()) |
| 162 LOG(ERROR) << "Failed to remove on-os-upgrade command."; | 162 LOG(ERROR) << "Failed to remove on-os-upgrade command."; |
| 163 } | 163 } |
| 164 | 164 |
| 165 void ProcessIELowRightsPolicyWorkItems(const InstallerState& installer_state) { | 165 void ProcessIELowRightsPolicyWorkItems(const InstallerState& installer_state) { |
| 166 scoped_ptr<WorkItemList> work_items(WorkItem::CreateNoRollbackWorkItemList()); | 166 scoped_ptr<WorkItemList> work_items(WorkItem::CreateNoRollbackWorkItemList()); |
| 167 AddDeleteOldIELowRightsPolicyWorkItems(installer_state, work_items.get()); | 167 AddDeleteOldIELowRightsPolicyWorkItems(installer_state, work_items.get()); |
| 168 work_items->Do(); | 168 work_items->Do(); |
| 169 RefreshElevationPolicy(); | 169 RefreshElevationPolicy(); |
| 170 } | 170 } |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 } | 691 } |
| 692 } | 692 } |
| 693 | 693 |
| 694 // Builds and executes a work item list to remove DelegateExecute verb handler | 694 // Builds and executes a work item list to remove DelegateExecute verb handler |
| 695 // work items for |product|. This will be a noop for products whose | 695 // work items for |product|. This will be a noop for products whose |
| 696 // corresponding BrowserDistribution implementations do not publish a CLSID via | 696 // corresponding BrowserDistribution implementations do not publish a CLSID via |
| 697 // GetCommandExecuteImplClsid. | 697 // GetCommandExecuteImplClsid. |
| 698 bool ProcessDelegateExecuteWorkItems(const InstallerState& installer_state, | 698 bool ProcessDelegateExecuteWorkItems(const InstallerState& installer_state, |
| 699 const Product& product) { | 699 const Product& product) { |
| 700 scoped_ptr<WorkItemList> item_list(WorkItem::CreateNoRollbackWorkItemList()); | 700 scoped_ptr<WorkItemList> item_list(WorkItem::CreateNoRollbackWorkItemList()); |
| 701 AddDelegateExecuteWorkItems(installer_state, base::FilePath(), | 701 AddDelegateExecuteWorkItems(installer_state, base::FilePath(), Version(), |
| 702 base::Version(), product, item_list.get()); | 702 product, item_list.get()); |
| 703 return item_list->Do(); | 703 return item_list->Do(); |
| 704 } | 704 } |
| 705 | 705 |
| 706 // Removes Active Setup entries from the registry. This cannot be done through | 706 // Removes Active Setup entries from the registry. This cannot be done through |
| 707 // a work items list as usual because of different paths based on conditionals, | 707 // a work items list as usual because of different paths based on conditionals, |
| 708 // but otherwise respects the no rollback/best effort uninstall mentality. | 708 // but otherwise respects the no rollback/best effort uninstall mentality. |
| 709 // This will only apply for system-level installs of Chrome/Chromium and will be | 709 // This will only apply for system-level installs of Chrome/Chromium and will be |
| 710 // a no-op for all other types of installs. | 710 // a no-op for all other types of installs. |
| 711 void UninstallActiveSetupEntries(const InstallerState& installer_state, | 711 void UninstallActiveSetupEntries(const InstallerState& installer_state, |
| 712 const Product& product) { | 712 const Product& product) { |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1419 // If we need a reboot to continue, schedule the parent directories for | 1419 // If we need a reboot to continue, schedule the parent directories for |
| 1420 // deletion unconditionally. If they are not empty, the session manager | 1420 // deletion unconditionally. If they are not empty, the session manager |
| 1421 // will not delete them on reboot. | 1421 // will not delete them on reboot. |
| 1422 ScheduleParentAndGrandparentForDeletion(target_path); | 1422 ScheduleParentAndGrandparentForDeletion(target_path); |
| 1423 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { | 1423 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { |
| 1424 *uninstall_status = UNINSTALL_FAILED; | 1424 *uninstall_status = UNINSTALL_FAILED; |
| 1425 } | 1425 } |
| 1426 } | 1426 } |
| 1427 | 1427 |
| 1428 } // namespace installer | 1428 } // namespace installer |
| OLD | NEW |