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

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

Issue 14711006: Quick fix to get 7DA counts for unified Chrome / App Launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing mix-up between InstallationState and InstallationLevel. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/installer/setup/install_worker.cc ('k') | no next file » | 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 // 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
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/file_util.h" 13 #include "base/file_util.h"
14 #include "base/path_service.h" 14 #include "base/path_service.h"
15 #include "base/process_util.h" 15 #include "base/process_util.h"
16 #include "base/string16.h" 16 #include "base/string16.h"
17 #include "base/string_util.h" 17 #include "base/string_util.h"
18 #include "base/strings/string_number_conversions.h" 18 #include "base/strings/string_number_conversions.h"
19 #include "base/utf_string_conversions.h" 19 #include "base/utf_string_conversions.h"
20 #include "base/win/registry.h" 20 #include "base/win/registry.h"
21 #include "base/win/scoped_handle.h" 21 #include "base/win/scoped_handle.h"
22 #include "base/win/shortcut.h" 22 #include "base/win/shortcut.h"
23 #include "base/win/windows_version.h" 23 #include "base/win/windows_version.h"
24 #include "chrome/common/chrome_constants.h" 24 #include "chrome/common/chrome_constants.h"
25 #include "chrome/common/chrome_paths_internal.h" 25 #include "chrome/common/chrome_paths_internal.h"
26 #include "chrome/common/chrome_result_codes.h" 26 #include "chrome/common/chrome_result_codes.h"
27 #include "chrome/installer/launcher_support/chrome_launcher_support.h"
27 #include "chrome/installer/setup/install.h" 28 #include "chrome/installer/setup/install.h"
28 #include "chrome/installer/setup/install_worker.h" 29 #include "chrome/installer/setup/install_worker.h"
29 #include "chrome/installer/setup/setup_constants.h" 30 #include "chrome/installer/setup/setup_constants.h"
30 #include "chrome/installer/setup/setup_util.h" 31 #include "chrome/installer/setup/setup_util.h"
31 #include "chrome/installer/util/auto_launch_util.h" 32 #include "chrome/installer/util/auto_launch_util.h"
32 #include "chrome/installer/util/browser_distribution.h" 33 #include "chrome/installer/util/browser_distribution.h"
33 #include "chrome/installer/util/channel_info.h" 34 #include "chrome/installer/util/channel_info.h"
34 #include "chrome/installer/util/delete_after_reboot_helper.h" 35 #include "chrome/installer/util/delete_after_reboot_helper.h"
35 #include "chrome/installer/util/google_update_constants.h" 36 #include "chrome/installer/util/google_update_constants.h"
36 #include "chrome/installer/util/google_update_settings.h" 37 #include "chrome/installer/util/google_update_settings.h"
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 1225
1225 ProcessDelegateExecuteWorkItems(installer_state, product); 1226 ProcessDelegateExecuteWorkItems(installer_state, product);
1226 1227
1227 ProcessOnOsUpgradeWorkItems(installer_state, product); 1228 ProcessOnOsUpgradeWorkItems(installer_state, product);
1228 1229
1229 UninstallActiveSetupEntries(installer_state, product); 1230 UninstallActiveSetupEntries(installer_state, product);
1230 1231
1231 // Notify the shell that associations have changed since Chrome was likely 1232 // Notify the shell that associations have changed since Chrome was likely
1232 // unregistered. 1233 // unregistered.
1233 SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL); 1234 SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);
1235
1236 // TODO(huangs): Implement actual migration code and remove the hack below.
1237 // Remove the "shadow" App Launcher registry keys.
1238 if (installer_state.is_multi_install()) {
1239 // If we're not uninstalling the legacy App Launcher, and if it was
1240 // not installed in the first place, then delete the "shadow" keys.
1241 chrome_launcher_support::InstallationState level_to_check =
1242 installer_state.system_install() ?
1243 chrome_launcher_support::INSTALLED_AT_SYSTEM_LEVEL :
1244 chrome_launcher_support::INSTALLED_AT_USER_LEVEL;
1245 bool has_legacy_app_launcher = level_to_check ==
1246 chrome_launcher_support::GetAppLauncherInstallationState();
1247 if (!has_legacy_app_launcher) {
1248 BrowserDistribution* shadow_app_launcher_dist =
1249 BrowserDistribution::GetSpecificDistribution(
1250 BrowserDistribution::CHROME_APP_HOST);
1251 InstallUtil::DeleteRegistryKey(reg_root,
1252 shadow_app_launcher_dist->GetVersionKey());
1253 }
1254 }
1234 } 1255 }
1235 1256
1236 if (product.is_chrome_frame()) { 1257 if (product.is_chrome_frame()) {
1237 ProcessChromeFrameWorkItems(original_state, installer_state, setup_path, 1258 ProcessChromeFrameWorkItems(original_state, installer_state, setup_path,
1238 product); 1259 product);
1239 } 1260 }
1240 1261
1241 if (installer_state.is_multi_install()) { 1262 if (installer_state.is_multi_install()) {
1242 ProcessGoogleUpdateItems(original_state, installer_state, product); 1263 ProcessGoogleUpdateItems(original_state, installer_state, product);
1243 1264
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 // deletion unconditionally. If they are not empty, the session manager 1430 // deletion unconditionally. If they are not empty, the session manager
1410 // will not delete them on reboot. 1431 // will not delete them on reboot.
1411 ScheduleParentAndGrandparentForDeletion(target_path); 1432 ScheduleParentAndGrandparentForDeletion(target_path);
1412 } else if (DeleteApplicationProductAndVendorDirectories(target_path) == 1433 } else if (DeleteApplicationProductAndVendorDirectories(target_path) ==
1413 installer::DELETE_FAILED) { 1434 installer::DELETE_FAILED) {
1414 *uninstall_status = installer::UNINSTALL_FAILED; 1435 *uninstall_status = installer::UNINSTALL_FAILED;
1415 } 1436 }
1416 } 1437 }
1417 1438
1418 } // namespace installer 1439 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/install_worker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698