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

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: Hey, it compiles! 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(
125 WorkItem::CreateNoRollbackWorkItemList());
robertshield 2011/09/23 18:34:24 ^ fits on one line?
grt (UTC plus 2) 2011/09/23 18:40:15 Done.
126 AddDeleteOldIELowRightsPolicyWorkItems(installer_state, work_items.get());
127 work_items->Do();
128 installer::RefreshElevationPolicy();
129 }
130
122 void ClearRlzProductState() { 131 void ClearRlzProductState() {
123 const rlz_lib::AccessPoint points[] = {rlz_lib::CHROME_OMNIBOX, 132 const rlz_lib::AccessPoint points[] = {rlz_lib::CHROME_OMNIBOX,
124 rlz_lib::CHROME_HOME_PAGE, 133 rlz_lib::CHROME_HOME_PAGE,
125 rlz_lib::NO_ACCESS_POINT}; 134 rlz_lib::NO_ACCESS_POINT};
126 135
127 rlz_lib::ClearProductState(rlz_lib::CHROME, points); 136 rlz_lib::ClearProductState(rlz_lib::CHROME, points);
128 137
129 // If chrome has been reactivated, clear all events for this brand as well. 138 // If chrome has been reactivated, clear all events for this brand as well.
130 std::wstring reactivation_brand; 139 std::wstring reactivation_brand;
131 if (GoogleUpdateSettings::GetReactivationBrand(&reactivation_brand)) { 140 if (GoogleUpdateSettings::GetReactivationBrand(&reactivation_brand)) {
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 WorkItem::CreateWorkItemList()); 792 WorkItem::CreateWorkItemList());
784 793
785 AddRegisterComDllWorkItems(dll_folder, 794 AddRegisterComDllWorkItems(dll_folder,
786 com_dll_list, 795 com_dll_list,
787 installer_state.system_install(), 796 installer_state.system_install(),
788 false, // Unregister 797 false, // Unregister
789 true, // May fail 798 true, // May fail
790 unreg_work_item_list.get()); 799 unreg_work_item_list.get());
791 unreg_work_item_list->Do(); 800 unreg_work_item_list->Do();
792 } 801 }
802
803 if (!is_chrome)
804 ProcessIELowRightsPolicyWorkItems(installer_state);
793 } 805 }
794 806
795 // Close any Chrome Frame helper processes that may be running. 807 // Close any Chrome Frame helper processes that may be running.
796 if (product.is_chrome_frame()) { 808 if (product.is_chrome_frame()) {
797 VLOG(1) << "Closing the Chrome Frame helper process"; 809 VLOG(1) << "Closing the Chrome Frame helper process";
798 CloseChromeFrameHelperProcess(); 810 CloseChromeFrameHelperProcess();
799 } 811 }
800 812
801 if (product_state == NULL) 813 if (product_state == NULL)
802 return installer::UNINSTALL_SUCCESSFUL; 814 return installer::UNINSTALL_SUCCESSFUL;
(...skipping 15 matching lines...) Expand all
818 if (prod_state.Initialize(installer_state.system_install(), 830 if (prod_state.Initialize(installer_state.system_install(),
819 BrowserDistribution::kProductTypes[i]) && 831 BrowserDistribution::kProductTypes[i]) &&
820 prod_state.is_multi_install()) { 832 prod_state.is_multi_install()) {
821 can_delete_files = false; 833 can_delete_files = false;
822 break; 834 break;
823 } 835 }
824 } 836 }
825 LOG(INFO) << (can_delete_files ? "Shared binaries will be deleted." : 837 LOG(INFO) << (can_delete_files ? "Shared binaries will be deleted." :
826 "Shared binaries still in use."); 838 "Shared binaries still in use.");
827 if (can_delete_files) { 839 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 = 840 BrowserDistribution* multi_dist =
837 installer_state.multi_package_binaries_distribution(); 841 installer_state.multi_package_binaries_distribution();
838 InstallUtil::DeleteRegistryKey(reg_root, multi_dist->GetVersionKey()); 842 InstallUtil::DeleteRegistryKey(reg_root, multi_dist->GetVersionKey());
839 } 843 }
840 } 844 }
841 845
842 FilePath backup_state_file(BackupLocalStateFile( 846 FilePath backup_state_file(BackupLocalStateFile(
843 GetLocalStateFolder(product))); 847 GetLocalStateFolder(product)));
844 848
845 DeleteResult delete_result = DELETE_SUCCEEDED; 849 DeleteResult delete_result = DELETE_SUCCEEDED;
(...skipping 24 matching lines...) Expand all
870 874
871 // Try and delete the preserved local state once the post-install 875 // Try and delete the preserved local state once the post-install
872 // operations are complete. 876 // operations are complete.
873 if (!backup_state_file.empty()) 877 if (!backup_state_file.empty())
874 file_util::Delete(backup_state_file, false); 878 file_util::Delete(backup_state_file, false);
875 879
876 return ret; 880 return ret;
877 } 881 }
878 882
879 } // namespace installer 883 } // 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