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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // Returns true if the installation represented by the pair of |dist| and | 99 // Returns true if the installation represented by the pair of |dist| and |
100 // |system_level| is a multi install. | 100 // |system_level| is a multi install. |
101 static bool IsMultiInstall(BrowserDistribution* dist, bool system_install); | 101 static bool IsMultiInstall(BrowserDistribution* dist, bool system_install); |
102 | 102 |
103 // Returns true if this is running setup process for Chrome SxS (as | 103 // Returns true if this is running setup process for Chrome SxS (as |
104 // indicated by the presence of --chrome-sxs on the command line) or if this | 104 // indicated by the presence of --chrome-sxs on the command line) or if this |
105 // is running Chrome process from the Chrome SxS installation (as indicated | 105 // is running Chrome process from the Chrome SxS installation (as indicated |
106 // by either --chrome-sxs or the executable path). | 106 // by either --chrome-sxs or the executable path). |
107 static bool IsChromeSxSProcess(); | 107 static bool IsChromeSxSProcess(); |
108 | 108 |
| 109 // Returns true if the sentinel file exists (or the path cannot be obtained). |
| 110 static bool IsFirstRunSentinelPresent(); |
| 111 |
109 // Populates |path| with the path to |file| in the sentinel directory for | 112 // Populates |path| with the path to |file| in the sentinel directory for |
110 // |dist|. Returns false on error. | 113 // |dist|. Returns false on error. |
111 static bool GetSentinelFilePath(const base::FilePath::CharType* file, | 114 static bool GetSentinelFilePath(const base::FilePath::CharType* file, |
112 BrowserDistribution* dist, | 115 BrowserDistribution* dist, |
113 base::FilePath* path); | 116 base::FilePath* path); |
114 | 117 |
115 // Deletes the registry key at path key_path under the key given by root_key. | 118 // Deletes the registry key at path key_path under the key given by root_key. |
116 static bool DeleteRegistryKey(HKEY root_key, const base::string16& key_path); | 119 static bool DeleteRegistryKey(HKEY root_key, const base::string16& key_path); |
117 | 120 |
118 // Deletes the registry value named value_name at path key_path under the key | 121 // Deletes the registry value named value_name at path key_path under the key |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 private: | 204 private: |
202 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); | 205 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); |
203 }; // class ProgramCompare | 206 }; // class ProgramCompare |
204 | 207 |
205 private: | 208 private: |
206 DISALLOW_COPY_AND_ASSIGN(InstallUtil); | 209 DISALLOW_COPY_AND_ASSIGN(InstallUtil); |
207 }; | 210 }; |
208 | 211 |
209 | 212 |
210 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 213 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ |
OLD | NEW |