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 22 matching lines...) Expand all Loading... |
33 class InstallUtil { | 33 class InstallUtil { |
34 public: | 34 public: |
35 // Get the path to this distribution's Active Setup registry entries. | 35 // Get the path to this distribution's Active Setup registry entries. |
36 // e.g. Software\Microsoft\Active Setup\Installed Components\<dist_guid> | 36 // e.g. Software\Microsoft\Active Setup\Installed Components\<dist_guid> |
37 static base::string16 GetActiveSetupPath(BrowserDistribution* dist); | 37 static base::string16 GetActiveSetupPath(BrowserDistribution* dist); |
38 | 38 |
39 // Attempts to trigger the command that would be run by Active Setup for a | 39 // Attempts to trigger the command that would be run by Active Setup for a |
40 // system-level Chrome. For use only when system-level Chrome is installed. | 40 // system-level Chrome. For use only when system-level Chrome is installed. |
41 static void TriggerActiveSetupCommand(); | 41 static void TriggerActiveSetupCommand(); |
42 | 42 |
| 43 // Sets a bit in the registry to note that the latest OS upgrade notification |
| 44 // has been handled by this user. Returns true if the previous bit was |
| 45 // different or absent (i.e., the latest OS update wasn't handled yet), in |
| 46 // which case subsequent calls to this method will return false until the next |
| 47 // OS upgrade. This call is only valid on system-level installs. |
| 48 static bool UpdateLastOSUpgradeHandledByActiveSetup( |
| 49 BrowserDistribution* dist); |
| 50 |
43 // Launches given exe as admin on Vista. | 51 // Launches given exe as admin on Vista. |
44 static bool ExecuteExeAsAdmin(const base::CommandLine& cmd, DWORD* exit_code); | 52 static bool ExecuteExeAsAdmin(const base::CommandLine& cmd, DWORD* exit_code); |
45 | 53 |
46 // Reads the uninstall command for Chromium from registry and returns it. | 54 // Reads the uninstall command for Chromium from registry and returns it. |
47 // If system_install is true the command is read from HKLM, otherwise | 55 // If system_install is true the command is read from HKLM, otherwise |
48 // from HKCU. | 56 // from HKCU. |
49 static base::CommandLine GetChromeUninstallCmd( | 57 static base::CommandLine GetChromeUninstallCmd( |
50 bool system_install, | 58 bool system_install, |
51 BrowserDistribution::Type distribution_type); | 59 BrowserDistribution::Type distribution_type); |
52 | 60 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 private: | 214 private: |
207 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); | 215 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); |
208 }; // class ProgramCompare | 216 }; // class ProgramCompare |
209 | 217 |
210 private: | 218 private: |
211 DISALLOW_COPY_AND_ASSIGN(InstallUtil); | 219 DISALLOW_COPY_AND_ASSIGN(InstallUtil); |
212 }; | 220 }; |
213 | 221 |
214 | 222 |
215 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 223 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ |
OLD | NEW |