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

Side by Side Diff: chrome/installer/setup/uninstall.cc

Issue 109673004: Revert "Update all users of base::Version to explicitly specify the namespace, and clean up the hea… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
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 // 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 bool success = update_list->Do(); 147 bool success = update_list->Do();
148 LOG_IF(ERROR, !success) << "Failed updating channel values."; 148 LOG_IF(ERROR, !success) << "Failed updating channel values.";
149 } 149 }
150 } 150 }
151 151
152 void ProcessOnOsUpgradeWorkItems( 152 void ProcessOnOsUpgradeWorkItems(
153 const installer::InstallerState& installer_state, 153 const installer::InstallerState& installer_state,
154 const installer::Product& product) { 154 const installer::Product& product) {
155 scoped_ptr<WorkItemList> work_item_list( 155 scoped_ptr<WorkItemList> work_item_list(
156 WorkItem::CreateNoRollbackWorkItemList()); 156 WorkItem::CreateNoRollbackWorkItemList());
157 AddOsUpgradeWorkItems(installer_state, base::FilePath(), base::Version(), 157 AddOsUpgradeWorkItems(installer_state, base::FilePath(), Version(), product,
158 product, work_item_list.get()); 158 work_item_list.get());
159 if (!work_item_list->Do()) 159 if (!work_item_list->Do())
160 LOG(ERROR) << "Failed to remove on-os-upgrade command."; 160 LOG(ERROR) << "Failed to remove on-os-upgrade command.";
161 } 161 }
162 162
163 void ProcessIELowRightsPolicyWorkItems( 163 void ProcessIELowRightsPolicyWorkItems(
164 const installer::InstallerState& installer_state) { 164 const installer::InstallerState& installer_state) {
165 scoped_ptr<WorkItemList> work_items(WorkItem::CreateNoRollbackWorkItemList()); 165 scoped_ptr<WorkItemList> work_items(WorkItem::CreateNoRollbackWorkItemList());
166 AddDeleteOldIELowRightsPolicyWorkItems(installer_state, work_items.get()); 166 AddDeleteOldIELowRightsPolicyWorkItems(installer_state, work_items.get());
167 work_items->Do(); 167 work_items->Do();
168 installer::RefreshElevationPolicy(); 168 installer::RefreshElevationPolicy();
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 if (!vendor_directory.empty()) 514 if (!vendor_directory.empty())
515 result = DeleteEmptyDir(vendor_directory); 515 result = DeleteEmptyDir(vendor_directory);
516 } 516 }
517 } 517 }
518 } 518 }
519 if (result == DELETE_NOT_EMPTY) 519 if (result == DELETE_NOT_EMPTY)
520 result = DELETE_SUCCEEDED; 520 result = DELETE_SUCCEEDED;
521 return result; 521 return result;
522 } 522 }
523 523
524 DeleteResult DeleteAppHostFilesAndFolders( 524 DeleteResult DeleteAppHostFilesAndFolders(const InstallerState& installer_state,
525 const InstallerState& installer_state, 525 const Version& installed_version) {
526 const base::Version& installed_version) {
527 const base::FilePath& target_path = installer_state.target_path(); 526 const base::FilePath& target_path = installer_state.target_path();
528 if (target_path.empty()) { 527 if (target_path.empty()) {
529 LOG(ERROR) << "DeleteAppHostFilesAndFolders: no installation destination " 528 LOG(ERROR) << "DeleteAppHostFilesAndFolders: no installation destination "
530 << "path."; 529 << "path.";
531 return DELETE_FAILED; // Nothing else we can do to uninstall, so we return. 530 return DELETE_FAILED; // Nothing else we can do to uninstall, so we return.
532 } 531 }
533 532
534 DeleteInstallTempDir(target_path); 533 DeleteInstallTempDir(target_path);
535 534
536 DeleteResult result = DELETE_SUCCEEDED; 535 DeleteResult result = DELETE_SUCCEEDED;
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 } 909 }
911 } 910 }
912 911
913 // Builds and executes a work item list to remove DelegateExecute verb handler 912 // Builds and executes a work item list to remove DelegateExecute verb handler
914 // work items for |product|. This will be a noop for products whose 913 // work items for |product|. This will be a noop for products whose
915 // corresponding BrowserDistribution implementations do not publish a CLSID via 914 // corresponding BrowserDistribution implementations do not publish a CLSID via
916 // GetCommandExecuteImplClsid. 915 // GetCommandExecuteImplClsid.
917 bool ProcessDelegateExecuteWorkItems(const InstallerState& installer_state, 916 bool ProcessDelegateExecuteWorkItems(const InstallerState& installer_state,
918 const Product& product) { 917 const Product& product) {
919 scoped_ptr<WorkItemList> item_list(WorkItem::CreateNoRollbackWorkItemList()); 918 scoped_ptr<WorkItemList> item_list(WorkItem::CreateNoRollbackWorkItemList());
920 AddDelegateExecuteWorkItems(installer_state, base::FilePath(), 919 AddDelegateExecuteWorkItems(installer_state, base::FilePath(), Version(),
921 base::Version(), product, item_list.get()); 920 product, item_list.get());
922 return item_list->Do(); 921 return item_list->Do();
923 } 922 }
924 923
925 // Removes Active Setup entries from the registry. This cannot be done through 924 // Removes Active Setup entries from the registry. This cannot be done through
926 // a work items list as usual because of different paths based on conditionals, 925 // a work items list as usual because of different paths based on conditionals,
927 // but otherwise respects the no rollback/best effort uninstall mentality. 926 // but otherwise respects the no rollback/best effort uninstall mentality.
928 // This will only apply for system-level installs of Chrome/Chromium and will be 927 // This will only apply for system-level installs of Chrome/Chromium and will be
929 // a no-op for all other types of installs. 928 // a no-op for all other types of installs.
930 void UninstallActiveSetupEntries(const InstallerState& installer_state, 929 void UninstallActiveSetupEntries(const InstallerState& installer_state,
931 const Product& product) { 930 const Product& product) {
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 // If we need a reboot to continue, schedule the parent directories for 1416 // If we need a reboot to continue, schedule the parent directories for
1418 // deletion unconditionally. If they are not empty, the session manager 1417 // deletion unconditionally. If they are not empty, the session manager
1419 // will not delete them on reboot. 1418 // will not delete them on reboot.
1420 ScheduleParentAndGrandparentForDeletion(target_path); 1419 ScheduleParentAndGrandparentForDeletion(target_path);
1421 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { 1420 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) {
1422 *uninstall_status = UNINSTALL_FAILED; 1421 *uninstall_status = UNINSTALL_FAILED;
1423 } 1422 }
1424 } 1423 }
1425 1424
1426 } // namespace installer 1425 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_util_unittest.cc ('k') | chrome/installer/test/alternate_version_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698