Chromium Code Reviews| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 | 73 |
| 74 // Returns the unsuffixed portion of the AppUserModelId. The AppUserModelId is | 74 // Returns the unsuffixed portion of the AppUserModelId. The AppUserModelId is |
| 75 // used to group an app's windows together on the Windows taskbar along with its | 75 // used to group an app's windows together on the Windows taskbar along with its |
| 76 // corresponding shortcuts; see | 76 // corresponding shortcuts; see |
| 77 // https://msdn.microsoft.com/library/windows/desktop/dd378459.aspx for more | 77 // https://msdn.microsoft.com/library/windows/desktop/dd378459.aspx for more |
| 78 // information. Use ShellUtil::GetBrowserModelId to get the suffixed value -- it | 78 // information. Use ShellUtil::GetBrowserModelId to get the suffixed value -- it |
| 79 // is almost never correct to use the unsuffixed (base) portion of this id | 79 // is almost never correct to use the unsuffixed (base) portion of this id |
| 80 // directly. | 80 // directly. |
| 81 const wchar_t* GetBaseAppId(); | 81 const wchar_t* GetBaseAppId(); |
| 82 | 82 |
| 83 // Returns the browser's ProgID prefix (e.g., ChromeHTML, ChromiumHTM, etc...). | |
|
huangs
2017/03/21 15:35:48
NIT: "etc..." => "etc." or "..."
grt (UTC plus 2)
2017/03/22 08:03:36
Done.
| |
| 84 // The full id is of the form |prefix|.|suffix| and is limited to a maximum | |
| 85 // length of 39 characters including null-terminator; see | |
| 86 // https://msdn.microsoft.com/library/windows/desktop/dd542719.aspx for details. | |
| 87 // We define |suffix| as a fixed-length 26-character alphanumeric identifier, | |
| 88 // therefore the return value of this function must have a maximum length of 39 | |
|
huangs
2017/03/21 15:35:48
Might be nice to keep the formula on its own line.
grt (UTC plus 2)
2017/03/22 08:03:36
Done.
| |
| 89 // - 1(null-term) - 26(|suffix|) - 1(dot separator) = 11 characters. | |
| 90 const wchar_t* GetProgIdPrefix(); | |
| 91 | |
| 92 // Returns the browser's ProgId description. | |
| 93 const wchar_t* GetProgIdDescription(); | |
| 94 | |
| 83 // Returns true if usage stats collecting is enabled for this user for the | 95 // Returns true if usage stats collecting is enabled for this user for the |
| 84 // current executable. | 96 // current executable. |
| 85 bool GetCollectStatsConsent(); | 97 bool GetCollectStatsConsent(); |
| 86 | 98 |
| 87 // Returns true if the current executable is currently in the chosen sample that | 99 // Returns true if the current executable is currently in the chosen sample that |
| 88 // will report stats and crashes. | 100 // will report stats and crashes. |
| 89 bool GetCollectStatsInSample(); | 101 bool GetCollectStatsInSample(); |
| 90 | 102 |
| 91 // Sets the registry value used for checking if Chrome is in the chosen sample | 103 // Sets the registry value used for checking if Chrome is in the chosen sample |
| 92 // that will report stats and crashes. Returns true if writing was successful. | 104 // that will report stats and crashes. Returns true if writing was successful. |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 199 std::wstring DetermineChannel(const InstallConstants& mode, | 211 std::wstring DetermineChannel(const InstallConstants& mode, |
| 200 bool system_level, | 212 bool system_level, |
| 201 bool from_binaries = false); | 213 bool from_binaries = false); |
| 202 | 214 |
| 203 // Caches the |ProcessType| of the current process. | 215 // Caches the |ProcessType| of the current process. |
| 204 extern ProcessType g_process_type; | 216 extern ProcessType g_process_type; |
| 205 | 217 |
| 206 } // namespace install_static | 218 } // namespace install_static |
| 207 | 219 |
| 208 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ | 220 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ |
| OLD | NEW |