| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 // Returns true if this installation path is per user, otherwise returns false | 86 // Returns true if this installation path is per user, otherwise returns false |
| 87 // (per machine install, meaning: the exe_path contains the path to Program | 87 // (per machine install, meaning: the exe_path contains the path to Program |
| 88 // Files). | 88 // Files). |
| 89 static bool IsPerUserInstall(const base::FilePath& exe_path); | 89 static bool IsPerUserInstall(const base::FilePath& exe_path); |
| 90 | 90 |
| 91 // Resets internal state for IsPerUserInstall so that the next call recomputes | 91 // Resets internal state for IsPerUserInstall so that the next call recomputes |
| 92 // with fresh data. | 92 // with fresh data. |
| 93 static void ResetIsPerUserInstallForTest(); | 93 static void ResetIsPerUserInstallForTest(); |
| 94 | 94 |
| 95 // Returns true if Chrome at |system_level| is a multi install. | |
| 96 static bool IsMultiInstall(bool system_install); | |
| 97 | |
| 98 // Returns true if this is running setup process for Chrome SxS (as | 95 // Returns true if this is running setup process for Chrome SxS (as |
| 99 // indicated by the presence of --chrome-sxs on the command line) or if this | 96 // indicated by the presence of --chrome-sxs on the command line) or if this |
| 100 // is running Chrome process from the Chrome SxS installation (as indicated | 97 // is running Chrome process from the Chrome SxS installation (as indicated |
| 101 // by either --chrome-sxs or the executable path). | 98 // by either --chrome-sxs or the executable path). |
| 102 static bool IsChromeSxSProcess(); | 99 static bool IsChromeSxSProcess(); |
| 103 | 100 |
| 104 // Returns true if the sentinel file exists (or the path cannot be obtained). | 101 // Returns true if the sentinel file exists (or the path cannot be obtained). |
| 105 static bool IsFirstRunSentinelPresent(); | 102 static bool IsFirstRunSentinelPresent(); |
| 106 | 103 |
| 107 // Populates |path| with EULA sentinel file path. Returns false on error. | 104 // Populates |path| with EULA sentinel file path. Returns false on error. |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 private: | 213 private: |
| 217 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); | 214 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); |
| 218 }; // class ProgramCompare | 215 }; // class ProgramCompare |
| 219 | 216 |
| 220 private: | 217 private: |
| 221 DISALLOW_COPY_AND_ASSIGN(InstallUtil); | 218 DISALLOW_COPY_AND_ASSIGN(InstallUtil); |
| 222 }; | 219 }; |
| 223 | 220 |
| 224 | 221 |
| 225 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 222 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ |
| OLD | NEW |