OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 declares Chrome uninstall related functions. | 5 // This file declares Chrome uninstall related functions. |
6 | 6 |
7 #ifndef CHROME_INSTALLER_SETUP_UNINSTALL_H_ | 7 #ifndef CHROME_INSTALLER_SETUP_UNINSTALL_H_ |
8 #define CHROME_INSTALLER_SETUP_UNINSTALL_H_ | 8 #define CHROME_INSTALLER_SETUP_UNINSTALL_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include <shlobj.h> | 13 #include <shlobj.h> |
14 | 14 |
15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
16 #include "chrome/installer/util/product.h" | 16 #include "chrome/installer/util/product.h" |
17 #include "chrome/installer/util/util_constants.h" | 17 #include "chrome/installer/util/util_constants.h" |
18 #include "chrome/installer/util/version.h" | 18 #include "chrome/installer/util/version.h" |
19 | 19 |
20 namespace installer { | 20 namespace installer { |
21 // This function removes all Chrome registration related keys. It returns true | 21 // This function removes all Chrome registration related keys. It returns true |
22 // if successful, otherwise false. The error code is set in |exit_code|. | 22 // if successful, otherwise false. The error code is set in |exit_code|. |
23 // |root| is the registry root (HKLM|HKCU) and |browser_entry_suffix| is the | 23 // |root| is the registry root (HKLM|HKCU) and |browser_entry_suffix| is the |
24 // suffix for default browser entry name in the registry (optional). | 24 // suffix for default browser entry name in the registry (optional). |
25 bool DeleteChromeRegistrationKeys(BrowserDistribution* dist, HKEY root, | 25 bool DeleteChromeRegistrationKeys(BrowserDistribution* dist, HKEY root, |
26 const std::wstring& browser_entry_suffix, | 26 const std::wstring& browser_entry_suffix, |
27 installer_util::InstallStatus& exit_code); | 27 installer::InstallStatus& exit_code); |
28 | 28 |
29 // Removes any legacy registry keys from earlier versions of Chrome that are no | 29 // Removes any legacy registry keys from earlier versions of Chrome that are no |
30 // longer needed. This is used during autoupdate since we don't do full | 30 // longer needed. This is used during autoupdate since we don't do full |
31 // uninstalls/reinstalls to update. | 31 // uninstalls/reinstalls to update. |
32 void RemoveLegacyRegistryKeys(BrowserDistribution* dist); | 32 void RemoveLegacyRegistryKeys(BrowserDistribution* dist); |
33 | 33 |
34 // This function uninstalls Chrome. | 34 // This function uninstalls Chrome. |
35 // | 35 // |
36 // setup_path: Path to the executable (setup.exe) as it will be copied | 36 // setup_path: Path to the executable (setup.exe) as it will be copied |
37 // to temp folder before deleting Chrome folder. | 37 // to temp folder before deleting Chrome folder. |
38 // dist: Represents the distribution to be uninstalled. | 38 // dist: Represents the distribution to be uninstalled. |
39 // remove_all: Remove all shared files, registry entries as well. | 39 // remove_all: Remove all shared files, registry entries as well. |
40 // force_uninstall: Uninstall without prompting for user confirmation or | 40 // force_uninstall: Uninstall without prompting for user confirmation or |
41 // any checks for Chrome running. | 41 // any checks for Chrome running. |
42 // cmd_line: CommandLine that contains information about the command that | 42 // cmd_line: CommandLine that contains information about the command that |
43 // was used to launch current uninstaller. | 43 // was used to launch current uninstaller. |
44 installer_util::InstallStatus UninstallChrome( | 44 installer::InstallStatus UninstallChrome( |
45 const FilePath& setup_path, const Product& dist, bool remove_all, | 45 const FilePath& setup_path, const Product& dist, bool remove_all, |
46 bool force_uninstall, const CommandLine& cmd_line); | 46 bool force_uninstall, const CommandLine& cmd_line); |
47 | 47 |
48 } // namespace installer_setup | 48 } // namespace installer_setup |
49 | 49 |
50 #endif // CHROME_INSTALLER_SETUP_UNINSTALL_H_ | 50 #endif // CHROME_INSTALLER_SETUP_UNINSTALL_H_ |
OLD | NEW |