| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // Unify this with the Browser Distribution code. | 126 // Unify this with the Browser Distribution code. |
| 127 void GetExecutableVersionDetails(const std::wstring& exe_path, | 127 void GetExecutableVersionDetails(const std::wstring& exe_path, |
| 128 std::wstring* product_name, | 128 std::wstring* product_name, |
| 129 std::wstring* version, | 129 std::wstring* version, |
| 130 std::wstring* special_build, | 130 std::wstring* special_build, |
| 131 std::wstring* channel_name); | 131 std::wstring* channel_name); |
| 132 | 132 |
| 133 // Gets the channel name for the current Chrome process. | 133 // Gets the channel name for the current Chrome process. |
| 134 std::wstring GetChromeChannelName(); | 134 std::wstring GetChromeChannelName(); |
| 135 | 135 |
| 136 // Returns the registry path where the browser crash dumps metrics need to be | |
| 137 // written to. | |
| 138 // TODO(ananta) | |
| 139 // http://crbug.com/604923 | |
| 140 // Unify this with the version in | |
| 141 // chrome\common\metrics_constants_util_win.cc | |
| 142 std::wstring GetBrowserCrashDumpAttemptsRegistryPath(); | |
| 143 | |
| 144 // Returns true if the |source| string matches the |pattern|. The pattern | 136 // Returns true if the |source| string matches the |pattern|. The pattern |
| 145 // may contain wildcards like '?', which matches one character or a '*' | 137 // may contain wildcards like '?', which matches one character or a '*' |
| 146 // which matches 0 or more characters. | 138 // which matches 0 or more characters. |
| 147 // Please note that pattern matches the whole string. If you want to find | 139 // Please note that pattern matches the whole string. If you want to find |
| 148 // something in the middle of the string then you need to specify the pattern | 140 // something in the middle of the string then you need to specify the pattern |
| 149 // as '*xyz*'. | 141 // as '*xyz*'. |
| 150 bool MatchPattern(const std::wstring& source, const std::wstring& pattern); | 142 bool MatchPattern(const std::wstring& source, const std::wstring& pattern); |
| 151 | 143 |
| 152 // UTF8 to UTF16 and vice versa conversion helpers. | 144 // UTF8 to UTF16 and vice versa conversion helpers. |
| 153 std::wstring UTF8ToUTF16(const std::string& source); | 145 std::wstring UTF8ToUTF16(const std::string& source); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 std::wstring DetermineChannel(const InstallConstants& mode, | 181 std::wstring DetermineChannel(const InstallConstants& mode, |
| 190 bool system_level, | 182 bool system_level, |
| 191 bool from_binaries = false); | 183 bool from_binaries = false); |
| 192 | 184 |
| 193 // Caches the |ProcessType| of the current process. | 185 // Caches the |ProcessType| of the current process. |
| 194 extern ProcessType g_process_type; | 186 extern ProcessType g_process_type; |
| 195 | 187 |
| 196 } // namespace install_static | 188 } // namespace install_static |
| 197 | 189 |
| 198 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ | 190 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ |
| OLD | NEW |