OLD | NEW |
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 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 | 9 |
10 #include <shlobj.h> | 10 #include <shlobj.h> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // longer needed. This is used during autoupdate since we don't do full | 53 // longer needed. This is used during autoupdate since we don't do full |
54 // uninstalls/reinstalls to update. | 54 // uninstalls/reinstalls to update. |
55 void RemoveChromeLegacyRegistryKeys(BrowserDistribution* dist, | 55 void RemoveChromeLegacyRegistryKeys(BrowserDistribution* dist, |
56 const base::string16& chrome_exe); | 56 const base::string16& chrome_exe); |
57 | 57 |
58 // This function uninstalls a product. Hence we came up with this awesome | 58 // This function uninstalls a product. Hence we came up with this awesome |
59 // name for it. | 59 // name for it. |
60 // | 60 // |
61 // original_state: The installation state of all products on the system. | 61 // original_state: The installation state of all products on the system. |
62 // installer_state: State associated with this operation. | 62 // installer_state: State associated with this operation. |
63 // setup_path: Path to the executable (setup.exe) as it will be copied | 63 // setup_exe: The path to the currently running setup.exe. It and its containing |
64 // to temp folder before deleting Chrome folder. | 64 // directories are left in-place if it is within the target directory of |
| 65 // the product being uninstalled. |
65 // dist: Represents the distribution to be uninstalled. | 66 // dist: Represents the distribution to be uninstalled. |
66 // remove_all: Remove all shared files, registry entries as well. | 67 // remove_all: Remove all shared files, registry entries as well. |
67 // force_uninstall: Uninstall without prompting for user confirmation or | 68 // force_uninstall: Uninstall without prompting for user confirmation or |
68 // any checks for Chrome running. | 69 // any checks for Chrome running. |
69 // cmd_line: CommandLine that contains information about the command that | 70 // cmd_line: CommandLine that contains information about the command that |
70 // was used to launch current uninstaller. | 71 // was used to launch current uninstaller. |
71 installer::InstallStatus UninstallProduct( | 72 installer::InstallStatus UninstallProduct( |
72 const InstallationState& original_state, | 73 const InstallationState& original_state, |
73 const InstallerState& installer_state, | 74 const InstallerState& installer_state, |
74 const base::FilePath& setup_path, | 75 const base::FilePath& setup_exe, |
75 const Product& dist, | 76 const Product& dist, |
76 bool remove_all, | 77 bool remove_all, |
77 bool force_uninstall, | 78 bool force_uninstall, |
78 const CommandLine& cmd_line); | 79 const CommandLine& cmd_line); |
79 | 80 |
80 // Cleans up the installation directory after all uninstall operations have | 81 // Cleans up the installation directory after all uninstall operations have |
81 // completed. Depending on what products are remaining, setup.exe and the | 82 // completed. Depending on what products are remaining, setup.exe and the |
82 // installer archive may be deleted. Empty directories will be pruned (or | 83 // installer archive may be deleted. Empty directories will be pruned (or |
83 // scheduled for pruning after reboot, if necessary). | 84 // scheduled for pruning after reboot, if necessary). |
84 // | 85 // |
85 // original_state: The installation state of all products on the system. | 86 // original_state: The installation state of all products on the system. |
86 // installer_state: State associated with this operation. | 87 // installer_state: State associated with this operation. |
87 // cmd_line: CommandLine that contains information about the command that | 88 // setup_exe: The path to the currently running setup.exe, which will be moved |
88 // was used to launch current uninstaller. | 89 // into a temporary directory to allow for deletion of the installation |
| 90 // directory. |
89 // uninstall_status: the uninstall status so far (may change during invocation). | 91 // uninstall_status: the uninstall status so far (may change during invocation). |
90 void CleanUpInstallationDirectoryAfterUninstall( | 92 void CleanUpInstallationDirectoryAfterUninstall( |
91 const InstallationState& original_state, | 93 const InstallationState& original_state, |
92 const InstallerState& installer_state, | 94 const InstallerState& installer_state, |
93 const CommandLine& cmd_line, | 95 const base::FilePath& setup_exe, |
94 InstallStatus* uninstall_status); | 96 InstallStatus* uninstall_status); |
95 | 97 |
96 } // namespace installer | 98 } // namespace installer |
97 | 99 |
98 #endif // CHROME_INSTALLER_SETUP_UNINSTALL_H_ | 100 #endif // CHROME_INSTALLER_SETUP_UNINSTALL_H_ |
OLD | NEW |