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

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

Issue 7976045: Fix in-use updates for Chrome Frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sanity check before dcommit Created 9 years, 3 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
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/util/copy_reg_key_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 const installer::InstallationState& machine_state) { 112 const installer::InstallationState& machine_state) {
113 scoped_ptr<WorkItemList> work_item_list( 113 scoped_ptr<WorkItemList> work_item_list(
114 WorkItem::CreateNoRollbackWorkItemList()); 114 WorkItem::CreateNoRollbackWorkItemList());
115 115
116 AddQuickEnableWorkItems(installer_state, machine_state, NULL, NULL, 116 AddQuickEnableWorkItems(installer_state, machine_state, NULL, NULL,
117 work_item_list.get()); 117 work_item_list.get());
118 if (!work_item_list->Do()) 118 if (!work_item_list->Do())
119 LOG(ERROR) << "Failed to update quick-enable-cf command."; 119 LOG(ERROR) << "Failed to update quick-enable-cf command.";
120 } 120 }
121 121
122 void ProcessIELowRightsPolicyWorkItems(
123 const installer::InstallerState& installer_state) {
124 scoped_ptr<WorkItemList> work_items(WorkItem::CreateNoRollbackWorkItemList());
125 AddDeleteOldIELowRightsPolicyWorkItems(installer_state, work_items.get());
126 work_items->Do();
127 installer::RefreshElevationPolicy();
128 }
129
122 void ClearRlzProductState() { 130 void ClearRlzProductState() {
123 const rlz_lib::AccessPoint points[] = {rlz_lib::CHROME_OMNIBOX, 131 const rlz_lib::AccessPoint points[] = {rlz_lib::CHROME_OMNIBOX,
124 rlz_lib::CHROME_HOME_PAGE, 132 rlz_lib::CHROME_HOME_PAGE,
125 rlz_lib::NO_ACCESS_POINT}; 133 rlz_lib::NO_ACCESS_POINT};
126 134
127 rlz_lib::ClearProductState(rlz_lib::CHROME, points); 135 rlz_lib::ClearProductState(rlz_lib::CHROME, points);
128 136
129 // If chrome has been reactivated, clear all events for this brand as well. 137 // If chrome has been reactivated, clear all events for this brand as well.
130 std::wstring reactivation_brand; 138 std::wstring reactivation_brand;
131 if (GoogleUpdateSettings::GetReactivationBrand(&reactivation_brand)) { 139 if (GoogleUpdateSettings::GetReactivationBrand(&reactivation_brand)) {
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 WorkItem::CreateWorkItemList()); 791 WorkItem::CreateWorkItemList());
784 792
785 AddRegisterComDllWorkItems(dll_folder, 793 AddRegisterComDllWorkItems(dll_folder,
786 com_dll_list, 794 com_dll_list,
787 installer_state.system_install(), 795 installer_state.system_install(),
788 false, // Unregister 796 false, // Unregister
789 true, // May fail 797 true, // May fail
790 unreg_work_item_list.get()); 798 unreg_work_item_list.get());
791 unreg_work_item_list->Do(); 799 unreg_work_item_list->Do();
792 } 800 }
801
802 if (!is_chrome)
803 ProcessIELowRightsPolicyWorkItems(installer_state);
793 } 804 }
794 805
795 // Close any Chrome Frame helper processes that may be running. 806 // Close any Chrome Frame helper processes that may be running.
796 if (product.is_chrome_frame()) { 807 if (product.is_chrome_frame()) {
797 VLOG(1) << "Closing the Chrome Frame helper process"; 808 VLOG(1) << "Closing the Chrome Frame helper process";
798 CloseChromeFrameHelperProcess(); 809 CloseChromeFrameHelperProcess();
799 } 810 }
800 811
801 if (product_state == NULL) 812 if (product_state == NULL)
802 return installer::UNINSTALL_SUCCESSFUL; 813 return installer::UNINSTALL_SUCCESSFUL;
(...skipping 15 matching lines...) Expand all
818 if (prod_state.Initialize(installer_state.system_install(), 829 if (prod_state.Initialize(installer_state.system_install(),
819 BrowserDistribution::kProductTypes[i]) && 830 BrowserDistribution::kProductTypes[i]) &&
820 prod_state.is_multi_install()) { 831 prod_state.is_multi_install()) {
821 can_delete_files = false; 832 can_delete_files = false;
822 break; 833 break;
823 } 834 }
824 } 835 }
825 LOG(INFO) << (can_delete_files ? "Shared binaries will be deleted." : 836 LOG(INFO) << (can_delete_files ? "Shared binaries will be deleted." :
826 "Shared binaries still in use."); 837 "Shared binaries still in use.");
827 if (can_delete_files) { 838 if (can_delete_files) {
828 // Remove the elevation policy when the last product is uninstalled.
829 scoped_ptr<WorkItemList> work_items(
830 WorkItem::CreateNoRollbackWorkItemList());
831 AddElevationPolicyWorkItems(original_state, installer_state,
832 product_state->version(), work_items.get());
833 work_items->Do();
834 RefreshElevationPolicy();
835
836 BrowserDistribution* multi_dist = 839 BrowserDistribution* multi_dist =
837 installer_state.multi_package_binaries_distribution(); 840 installer_state.multi_package_binaries_distribution();
838 InstallUtil::DeleteRegistryKey(reg_root, multi_dist->GetVersionKey()); 841 InstallUtil::DeleteRegistryKey(reg_root, multi_dist->GetVersionKey());
839 } 842 }
840 } 843 }
841 844
842 FilePath backup_state_file(BackupLocalStateFile( 845 FilePath backup_state_file(BackupLocalStateFile(
843 GetLocalStateFolder(product))); 846 GetLocalStateFolder(product)));
844 847
845 DeleteResult delete_result = DELETE_SUCCEEDED; 848 DeleteResult delete_result = DELETE_SUCCEEDED;
(...skipping 24 matching lines...) Expand all
870 873
871 // Try and delete the preserved local state once the post-install 874 // Try and delete the preserved local state once the post-install
872 // operations are complete. 875 // operations are complete.
873 if (!backup_state_file.empty()) 876 if (!backup_state_file.empty())
874 file_util::Delete(backup_state_file, false); 877 file_util::Delete(backup_state_file, false);
875 878
876 return ret; 879 return ret;
877 } 880 }
878 881
879 } // namespace installer 882 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/util/copy_reg_key_work_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698