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

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

Issue 269793004: installer: Remove dependency on extensions' constant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/DEPS ('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
(...skipping 29 matching lines...) Expand all
40 #include "chrome/installer/util/google_update_settings.h" 40 #include "chrome/installer/util/google_update_settings.h"
41 #include "chrome/installer/util/helper.h" 41 #include "chrome/installer/util/helper.h"
42 #include "chrome/installer/util/install_util.h" 42 #include "chrome/installer/util/install_util.h"
43 #include "chrome/installer/util/installation_state.h" 43 #include "chrome/installer/util/installation_state.h"
44 #include "chrome/installer/util/installer_state.h" 44 #include "chrome/installer/util/installer_state.h"
45 #include "chrome/installer/util/logging_installer.h" 45 #include "chrome/installer/util/logging_installer.h"
46 #include "chrome/installer/util/self_cleaning_temp_dir.h" 46 #include "chrome/installer/util/self_cleaning_temp_dir.h"
47 #include "chrome/installer/util/shell_util.h" 47 #include "chrome/installer/util/shell_util.h"
48 #include "chrome/installer/util/util_constants.h" 48 #include "chrome/installer/util/util_constants.h"
49 #include "content/public/common/result_codes.h" 49 #include "content/public/common/result_codes.h"
50 #include "extensions/common/constants.h"
51 #include "rlz/lib/rlz_lib.h" 50 #include "rlz/lib/rlz_lib.h"
52 51
53 using base::win::RegKey; 52 using base::win::RegKey;
54 53
55 namespace installer { 54 namespace installer {
56 55
57 namespace { 56 namespace {
58 57
59 // Avoid leaving behind a Temp dir. If one exists, ask SelfCleaningTempDir to 58 // Avoid leaving behind a Temp dir. If one exists, ask SelfCleaningTempDir to
60 // clean it up for us. This may involve scheduling it for deletion after 59 // clean it up for us. This may involve scheduling it for deletion after
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 // Delete Software\Classes\ChromeExt, 1040 // Delete Software\Classes\ChromeExt,
1042 base::string16 ext_prog_id(ShellUtil::kRegClasses); 1041 base::string16 ext_prog_id(ShellUtil::kRegClasses);
1043 ext_prog_id.push_back(base::FilePath::kSeparators[0]); 1042 ext_prog_id.push_back(base::FilePath::kSeparators[0]);
1044 ext_prog_id.append(kChromeExtProgId); 1043 ext_prog_id.append(kChromeExtProgId);
1045 ext_prog_id.append(suffix); 1044 ext_prog_id.append(suffix);
1046 InstallUtil::DeleteRegistryKey(roots[i], ext_prog_id); 1045 InstallUtil::DeleteRegistryKey(roots[i], ext_prog_id);
1047 1046
1048 // Delete Software\Classes\.crx, 1047 // Delete Software\Classes\.crx,
1049 base::string16 ext_association(ShellUtil::kRegClasses); 1048 base::string16 ext_association(ShellUtil::kRegClasses);
1050 ext_association.append(L"\\"); 1049 ext_association.append(L"\\");
1051 ext_association.append(extensions::kExtensionFileExtension); 1050 ext_association.append(L".crx");
1052 InstallUtil::DeleteRegistryKey(roots[i], ext_association); 1051 InstallUtil::DeleteRegistryKey(roots[i], ext_association);
1053 } 1052 }
1054 } 1053 }
1055 1054
1056 void UninstallFirewallRules(BrowserDistribution* dist, 1055 void UninstallFirewallRules(BrowserDistribution* dist,
1057 const base::FilePath& chrome_exe) { 1056 const base::FilePath& chrome_exe) {
1058 scoped_ptr<FirewallManager> manager = 1057 scoped_ptr<FirewallManager> manager =
1059 FirewallManager::Create(dist, chrome_exe); 1058 FirewallManager::Create(dist, chrome_exe);
1060 if (manager) 1059 if (manager)
1061 manager->RemoveFirewallRules(); 1060 manager->RemoveFirewallRules();
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 // If we need a reboot to continue, schedule the parent directories for 1438 // If we need a reboot to continue, schedule the parent directories for
1440 // deletion unconditionally. If they are not empty, the session manager 1439 // deletion unconditionally. If they are not empty, the session manager
1441 // will not delete them on reboot. 1440 // will not delete them on reboot.
1442 ScheduleParentAndGrandparentForDeletion(target_path); 1441 ScheduleParentAndGrandparentForDeletion(target_path);
1443 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { 1442 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) {
1444 *uninstall_status = UNINSTALL_FAILED; 1443 *uninstall_status = UNINSTALL_FAILED;
1445 } 1444 }
1446 } 1445 }
1447 1446
1448 } // namespace installer 1447 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698