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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 const base::string16* const launch_cmd, | 79 const base::string16* const launch_cmd, |
80 WorkItemList* install_list); | 80 WorkItemList* install_list); |
81 | 81 |
82 // Returns true if this installation path is per user, otherwise returns false | 82 // Returns true if this installation path is per user, otherwise returns false |
83 // (per machine install, meaning: the exe_path contains the path to Program | 83 // (per machine install, meaning: the exe_path contains the path to Program |
84 // Files). | 84 // Files). |
85 // TODO(grt): consider replacing all callers with direct use of | 85 // TODO(grt): consider replacing all callers with direct use of |
86 // InstallDetails. | 86 // InstallDetails. |
87 static bool IsPerUserInstall(); | 87 static bool IsPerUserInstall(); |
88 | 88 |
89 // Returns true if this is running setup process for Chrome SxS (as | |
90 // indicated by the presence of --chrome-sxs on the command line) or if this | |
91 // is running Chrome process from the Chrome SxS installation (as indicated | |
92 // by either --chrome-sxs or the executable path). | |
93 static bool IsChromeSxSProcess(); | |
94 | |
95 // Returns true if the sentinel file exists (or the path cannot be obtained). | 89 // Returns true if the sentinel file exists (or the path cannot be obtained). |
96 static bool IsFirstRunSentinelPresent(); | 90 static bool IsFirstRunSentinelPresent(); |
97 | 91 |
98 // Populates |path| with EULA sentinel file path. Returns false on error. | 92 // Populates |path| with EULA sentinel file path. Returns false on error. |
99 static bool GetEULASentinelFilePath(base::FilePath* path); | 93 static bool GetEULASentinelFilePath(base::FilePath* path); |
100 | 94 |
101 // Deletes the registry key at path key_path under the key given by root_key. | 95 // Deletes the registry key at path key_path under the key given by root_key. |
102 static bool DeleteRegistryKey(HKEY root_key, | 96 static bool DeleteRegistryKey(HKEY root_key, |
103 const base::string16& key_path, | 97 const base::string16& key_path, |
104 REGSAM wow64_access); | 98 REGSAM wow64_access); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 private: | 205 private: |
212 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); | 206 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); |
213 }; // class ProgramCompare | 207 }; // class ProgramCompare |
214 | 208 |
215 private: | 209 private: |
216 DISALLOW_COPY_AND_ASSIGN(InstallUtil); | 210 DISALLOW_COPY_AND_ASSIGN(InstallUtil); |
217 }; | 211 }; |
218 | 212 |
219 | 213 |
220 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 214 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ |
OLD | NEW |