OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 contains helper functions which provide information about the | 5 // This file contains helper functions which provide information about the |
6 // current version of Chrome. This includes channel information, version | 6 // current version of Chrome. This includes channel information, version |
7 // information etc. This functionality is provided by using functions in | 7 // information etc. This functionality is provided by using functions in |
8 // kernel32 and advapi32. No other dependencies are allowed in this file. | 8 // kernel32 and advapi32. No other dependencies are allowed in this file. |
9 | 9 |
10 #ifndef CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ | 10 #ifndef CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 bool IsProcessTypeInitialized(); | 152 bool IsProcessTypeInitialized(); |
153 | 153 |
154 // Returns true if invoked in a Chrome process other than the main browser | 154 // Returns true if invoked in a Chrome process other than the main browser |
155 // process. False otherwise. | 155 // process. False otherwise. |
156 bool IsNonBrowserProcess(); | 156 bool IsNonBrowserProcess(); |
157 | 157 |
158 // Returns true if the |process_type| has the rights to access the profile. | 158 // Returns true if the |process_type| has the rights to access the profile. |
159 // False otherwise. | 159 // False otherwise. |
160 bool ProcessNeedsProfileDir(const std::string& process_type); | 160 bool ProcessNeedsProfileDir(const std::string& process_type); |
161 | 161 |
162 // Populates |crash_dir| with the crash dump location, respecting modifications | 162 // Returns true if the current process has the rights to access the profile. |
163 // to user-data-dir. | 163 // False otherwise. |
164 // TODO(ananta) | 164 bool CurrentProcessNeedsProfileDir(); |
165 // http://crbug.com/604923 | 165 |
166 // Unify this with the Browser Distribution code. | 166 // Retrieves the user data directory, or an empty string on failure. |
| 167 std::wstring GetUserDataDirectory(); |
| 168 |
| 169 // Retrieves an invalid user data directory specified by the user, or an empty |
| 170 // string. |
| 171 std::wstring GetInvalidUserDataDirectory(); |
| 172 |
| 173 // Returns the crash dump location, respecting modifications to user-data-dir. |
| 174 // TODO(ananta): Unify this with the Browser Distribution code. |
| 175 // http://crbug.com/604923 |
167 std::wstring GetCrashDumpLocation(); | 176 std::wstring GetCrashDumpLocation(); |
168 | 177 |
169 // Returns the contents of the specified |variable_name| from the environment | 178 // Returns the contents of the specified |variable_name| from the environment |
170 // block of the calling process. Returns an empty string if the variable does | 179 // block of the calling process. Returns an empty string if the variable does |
171 // not exist. | 180 // not exist. |
172 std::string GetEnvironmentString(const std::string& variable_name); | 181 std::string GetEnvironmentString(const std::string& variable_name); |
173 std::wstring GetEnvironmentString16(const wchar_t* variable_name); | 182 std::wstring GetEnvironmentString16(const wchar_t* variable_name); |
174 | 183 |
175 // Sets the environment variable identified by |variable_name| to the value | 184 // Sets the environment variable identified by |variable_name| to the value |
176 // identified by |new_value|. | 185 // identified by |new_value|. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 // key in the registry. | 259 // key in the registry. |
251 std::wstring DetermineChannel(const InstallConstants& mode, | 260 std::wstring DetermineChannel(const InstallConstants& mode, |
252 bool system_level, | 261 bool system_level, |
253 bool from_binaries, | 262 bool from_binaries, |
254 std::wstring* update_ap, | 263 std::wstring* update_ap, |
255 std::wstring* update_cohort_name); | 264 std::wstring* update_cohort_name); |
256 | 265 |
257 } // namespace install_static | 266 } // namespace install_static |
258 | 267 |
259 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ | 268 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ |
OLD | NEW |