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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 // details. | 78 // details. |
79 static void AddInstallerResultItems(bool system_install, | 79 static void AddInstallerResultItems(bool system_install, |
80 const base::string16& state_key, | 80 const base::string16& state_key, |
81 installer::InstallStatus status, | 81 installer::InstallStatus status, |
82 int string_resource_id, | 82 int string_resource_id, |
83 const base::string16* const launch_cmd, | 83 const base::string16* const launch_cmd, |
84 WorkItemList* install_list); | 84 WorkItemList* install_list); |
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). |
gab
2017/02/14 16:57:56
Deprecated comment + TODO to remove.
grt (UTC plus 2)
2017/02/14 21:04:24
I'm on the fence as to whether or not this should
| |
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 | |
92 // with fresh data. | |
93 static void ResetIsPerUserInstallForTest(); | |
94 | |
95 // Returns true if this is running setup process for Chrome SxS (as | 91 // Returns true if this is running setup process for Chrome SxS (as |
96 // indicated by the presence of --chrome-sxs on the command line) or if this | 92 // indicated by the presence of --chrome-sxs on the command line) or if this |
97 // is running Chrome process from the Chrome SxS installation (as indicated | 93 // is running Chrome process from the Chrome SxS installation (as indicated |
98 // by either --chrome-sxs or the executable path). | 94 // by either --chrome-sxs or the executable path). |
99 static bool IsChromeSxSProcess(); | 95 static bool IsChromeSxSProcess(); |
100 | 96 |
101 // Returns true if the sentinel file exists (or the path cannot be obtained). | 97 // Returns true if the sentinel file exists (or the path cannot be obtained). |
102 static bool IsFirstRunSentinelPresent(); | 98 static bool IsFirstRunSentinelPresent(); |
103 | 99 |
104 // Populates |path| with EULA sentinel file path. Returns false on error. | 100 // Populates |path| with EULA sentinel file path. Returns false on error. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 private: | 209 private: |
214 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); | 210 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); |
215 }; // class ProgramCompare | 211 }; // class ProgramCompare |
216 | 212 |
217 private: | 213 private: |
218 DISALLOW_COPY_AND_ASSIGN(InstallUtil); | 214 DISALLOW_COPY_AND_ASSIGN(InstallUtil); |
219 }; | 215 }; |
220 | 216 |
221 | 217 |
222 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 218 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ |
OLD | NEW |