| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 const base::string16* const launch_cmd, | 88 const base::string16* const launch_cmd, |
| 89 WorkItemList* install_list); | 89 WorkItemList* install_list); |
| 90 | 90 |
| 91 // Update the installer stage reported by Google Update. |state_key_path| | 91 // Update the installer stage reported by Google Update. |state_key_path| |
| 92 // should be obtained via the state_key method of an InstallerState instance | 92 // should be obtained via the state_key method of an InstallerState instance |
| 93 // created before the machine state is modified by the installer. | 93 // created before the machine state is modified by the installer. |
| 94 static void UpdateInstallerStage(bool system_install, | 94 static void UpdateInstallerStage(bool system_install, |
| 95 const base::string16& state_key_path, | 95 const base::string16& state_key_path, |
| 96 installer::InstallerStage stage); | 96 installer::InstallerStage stage); |
| 97 | 97 |
| 98 // Returns a string representing |stage|. |
| 99 static const base::char16* const StageToString(installer::InstallerStage); |
| 100 |
| 98 // Returns true if this installation path is per user, otherwise returns false | 101 // Returns true if this installation path is per user, otherwise returns false |
| 99 // (per machine install, meaning: the exe_path contains the path to Program | 102 // (per machine install, meaning: the exe_path contains the path to Program |
| 100 // Files). | 103 // Files). |
| 101 static bool IsPerUserInstall(const base::FilePath& exe_path); | 104 static bool IsPerUserInstall(const base::FilePath& exe_path); |
| 102 | 105 |
| 103 // Returns true if the installation represented by the pair of |dist| and | 106 // Returns true if the installation represented by the pair of |dist| and |
| 104 // |system_level| is a multi install. | 107 // |system_level| is a multi install. |
| 105 static bool IsMultiInstall(BrowserDistribution* dist, bool system_install); | 108 static bool IsMultiInstall(BrowserDistribution* dist, bool system_install); |
| 106 | 109 |
| 107 // Returns true if this is running setup process for Chrome SxS (as | 110 // Returns true if this is running setup process for Chrome SxS (as |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 private: | 213 private: |
| 211 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); | 214 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); |
| 212 }; // class ProgramCompare | 215 }; // class ProgramCompare |
| 213 | 216 |
| 214 private: | 217 private: |
| 215 DISALLOW_COPY_AND_ASSIGN(InstallUtil); | 218 DISALLOW_COPY_AND_ASSIGN(InstallUtil); |
| 216 }; | 219 }; |
| 217 | 220 |
| 218 | 221 |
| 219 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 222 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ |
| OLD | NEW |