| 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 namespace base { | 26 namespace base { |
| 27 class Version; | 27 class Version; |
| 28 } | 28 } |
| 29 | 29 |
| 30 // This is a utility class that provides common installation related | 30 // This is a utility class that provides common installation related |
| 31 // utility methods that can be used by installer and also unit tested | 31 // utility methods that can be used by installer and also unit tested |
| 32 // independently. | 32 // independently. |
| 33 class InstallUtil { | 33 class InstallUtil { |
| 34 public: | 34 public: |
| 35 // Returns true if properties that enable Metro mode on Win8+ should be | |
| 36 // installed. | |
| 37 static bool ShouldInstallMetroProperties(); | |
| 38 | |
| 39 // Get the path to this distribution's Active Setup registry entries. | 35 // Get the path to this distribution's Active Setup registry entries. |
| 40 // e.g. Software\Microsoft\Active Setup\Installed Components\<dist_guid> | 36 // e.g. Software\Microsoft\Active Setup\Installed Components\<dist_guid> |
| 41 static base::string16 GetActiveSetupPath(BrowserDistribution* dist); | 37 static base::string16 GetActiveSetupPath(BrowserDistribution* dist); |
| 42 | 38 |
| 43 // 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 |
| 44 // 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. |
| 45 static void TriggerActiveSetupCommand(); | 41 static void TriggerActiveSetupCommand(); |
| 46 | 42 |
| 47 // Launches given exe as admin on Vista. | 43 // Launches given exe as admin on Vista. |
| 48 static bool ExecuteExeAsAdmin(const base::CommandLine& cmd, DWORD* exit_code); | 44 static bool ExecuteExeAsAdmin(const base::CommandLine& cmd, DWORD* exit_code); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 private: | 206 private: |
| 211 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); | 207 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); |
| 212 }; // class ProgramCompare | 208 }; // class ProgramCompare |
| 213 | 209 |
| 214 private: | 210 private: |
| 215 DISALLOW_COPY_AND_ASSIGN(InstallUtil); | 211 DISALLOW_COPY_AND_ASSIGN(InstallUtil); |
| 216 }; | 212 }; |
| 217 | 213 |
| 218 | 214 |
| 219 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 215 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ |
| OLD | NEW |