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 utility functions for the installer. The original reason | 5 // This file declares utility functions for the installer. The original reason |
6 // for putting these functions in installer\util library is so that we can | 6 // for putting these functions in installer\util library is so that we can |
7 // separate out the critical logic and write unit tests for it. | 7 // separate out the critical logic and write unit tests for it. |
8 | 8 |
9 #ifndef CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 9 #ifndef CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ |
10 #define CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 10 #define CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ |
(...skipping 14 matching lines...) Expand all Loading... | |
25 | 25 |
26 // This is a utility class that provides common installation related | 26 // This is a utility class that provides common installation related |
27 // utility methods that can be used by installer and also unit tested | 27 // utility methods that can be used by installer and also unit tested |
28 // independently. | 28 // independently. |
29 class InstallUtil { | 29 class InstallUtil { |
30 public: | 30 public: |
31 // Get the path to this distribution's Active Setup registry entries. | 31 // Get the path to this distribution's Active Setup registry entries. |
32 // e.g. Software\Microsoft\Active Setup\Installed Components\<dist_guid> | 32 // e.g. Software\Microsoft\Active Setup\Installed Components\<dist_guid> |
33 static string16 GetActiveSetupPath(BrowserDistribution* dist); | 33 static string16 GetActiveSetupPath(BrowserDistribution* dist); |
34 | 34 |
35 // Attempts to trigger the command that would be triggered for Chrome on | 35 // Attempts to trigger the command that would be ran by Active Setup for a |
grt (UTC plus 2)
2012/11/20 15:55:38
ran -> run
gab
2012/11/20 20:42:11
Done.
| |
36 // Active Setup. This will be a no-op for user-level installs. | 36 // system-level Chrome. For use only when system-level Chrome is installed. |
37 static void TriggerActiveSetupCommandIfNeeded(); | 37 static void TriggerActiveSetupCommand(); |
38 | 38 |
39 // Launches given exe as admin on Vista. | 39 // Launches given exe as admin on Vista. |
40 static bool ExecuteExeAsAdmin(const CommandLine& cmd, DWORD* exit_code); | 40 static bool ExecuteExeAsAdmin(const CommandLine& cmd, DWORD* exit_code); |
41 | 41 |
42 // Reads the uninstall command for Chromium from registry and returns it. | 42 // Reads the uninstall command for Chromium from registry and returns it. |
43 // If system_install is true the command is read from HKLM, otherwise | 43 // If system_install is true the command is read from HKLM, otherwise |
44 // from HKCU. | 44 // from HKCU. |
45 static CommandLine GetChromeUninstallCmd( | 45 static CommandLine GetChromeUninstallCmd( |
46 bool system_install, | 46 bool system_install, |
47 BrowserDistribution::Type distribution_type); | 47 BrowserDistribution::Type distribution_type); |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
198 private: | 198 private: |
199 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); | 199 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); |
200 }; // class ProgramCompare | 200 }; // class ProgramCompare |
201 | 201 |
202 private: | 202 private: |
203 DISALLOW_COPY_AND_ASSIGN(InstallUtil); | 203 DISALLOW_COPY_AND_ASSIGN(InstallUtil); |
204 }; | 204 }; |
205 | 205 |
206 | 206 |
207 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 207 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ |
OLD | NEW |