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 // This file contains helper functions which provide information about the | 4 // This file contains helper functions which provide information about the |
| 5 // current version of Chrome. This includes channel information, version | 5 // current version of Chrome. This includes channel information, version |
| 6 // information etc. This functionality is provided by using functions in | 6 // information etc. This functionality is provided by using functions in |
| 7 // kernel32 and advapi32. No other dependencies are allowed in this file. | 7 // kernel32 and advapi32. No other dependencies are allowed in this file. |
| 8 | 8 |
| 9 #ifndef CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ | 9 #ifndef CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ |
| 10 #define CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ | 10 #define CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 extern const wchar_t kRegPathClientStateMedium[]; | 34 extern const wchar_t kRegPathClientStateMedium[]; |
| 35 extern const wchar_t kRegPathChromePolicy[]; | 35 extern const wchar_t kRegPathChromePolicy[]; |
| 36 extern const wchar_t kRegApField[]; | 36 extern const wchar_t kRegApField[]; |
| 37 extern const wchar_t kRegValueUsageStats[]; | 37 extern const wchar_t kRegValueUsageStats[]; |
| 38 extern const wchar_t kUninstallArgumentsField[]; | 38 extern const wchar_t kUninstallArgumentsField[]; |
| 39 extern const wchar_t kMetricsReportingEnabled[]; | 39 extern const wchar_t kMetricsReportingEnabled[]; |
| 40 extern const wchar_t kAppGuidCanary[]; | 40 extern const wchar_t kAppGuidCanary[]; |
| 41 extern const wchar_t kAppGuidGoogleChrome[]; | 41 extern const wchar_t kAppGuidGoogleChrome[]; |
| 42 extern const wchar_t kAppGuidGoogleBinaries[]; | 42 extern const wchar_t kAppGuidGoogleBinaries[]; |
| 43 | 43 |
| 44 extern const wchar_t kChromeMetrics[]; | |
| 45 extern const wchar_t kChromeStatsSampleKey[]; | |
| 46 | |
| 44 // TODO(ananta) | 47 // TODO(ananta) |
| 45 // https://crbug.com/604923 | 48 // https://crbug.com/604923 |
| 46 // Unify these constants with env_vars.h. | 49 // Unify these constants with env_vars.h. |
| 47 extern const wchar_t kHeadless[]; | 50 extern const wchar_t kHeadless[]; |
| 48 extern const wchar_t kShowRestart[]; | 51 extern const wchar_t kShowRestart[]; |
| 49 extern const wchar_t kRestartInfo[]; | 52 extern const wchar_t kRestartInfo[]; |
| 50 extern const wchar_t kRtlLocale[]; | 53 extern const wchar_t kRtlLocale[]; |
| 51 | 54 |
| 52 // TODO(ananta) | 55 // TODO(ananta) |
| 53 // https://crbug.com/604923 | 56 // https://crbug.com/604923 |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 71 | 74 |
| 72 // Returns true if usage stats collecting is enabled for this user for the | 75 // Returns true if usage stats collecting is enabled for this user for the |
| 73 // current executable. | 76 // current executable. |
| 74 bool GetCollectStatsConsent(); | 77 bool GetCollectStatsConsent(); |
| 75 | 78 |
| 76 // Returns true if usage stats collecting is enabled for this user for the | 79 // Returns true if usage stats collecting is enabled for this user for the |
| 77 // executable passed in as |exe_path|. | 80 // executable passed in as |exe_path|. |
| 78 // Only used by tests. | 81 // Only used by tests. |
| 79 bool GetCollectStatsConsentForTesting(const std::wstring& exe_path); | 82 bool GetCollectStatsConsentForTesting(const std::wstring& exe_path); |
| 80 | 83 |
| 84 // Returns true if the current executable is curretnly in the chosen sample that | |
|
scottmg
2016/08/11 21:38:03
currently
jwd
2016/08/11 22:02:53
Done.
| |
| 85 // will report stats and crashes. | |
| 86 bool GetCollectStatsInSample(); | |
| 87 | |
| 81 // Returns true if if usage stats reporting is controlled by a mandatory | 88 // Returns true if if usage stats reporting is controlled by a mandatory |
| 82 // policy. |metrics_is_enforced_by_policy| will be set to true accordingly. | 89 // policy. |metrics_is_enforced_by_policy| will be set to true accordingly. |
| 83 // TODO(ananta) | 90 // TODO(ananta) |
| 84 // Make this function private to install_util. | 91 // Make this function private to install_util. |
| 85 bool ReportingIsEnforcedByPolicy(bool* metrics_is_enforced_by_policy); | 92 bool ReportingIsEnforcedByPolicy(bool* metrics_is_enforced_by_policy); |
| 86 | 93 |
| 87 // Initializes |g_process_type| which stores whether or not the current | 94 // Initializes |g_process_type| which stores whether or not the current |
| 88 // process is the main browser process. | 95 // process is the main browser process. |
| 89 void InitializeProcessType(); | 96 void InitializeProcessType(); |
| 90 | 97 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 // value of the |switch_name| passed in. | 214 // value of the |switch_name| passed in. |
| 208 std::string GetSwitchValueFromCommandLine(const std::string& command_line, | 215 std::string GetSwitchValueFromCommandLine(const std::string& command_line, |
| 209 const std::string& switch_name); | 216 const std::string& switch_name); |
| 210 | 217 |
| 211 // Caches the |ProcessType| of the current process. | 218 // Caches the |ProcessType| of the current process. |
| 212 extern ProcessType g_process_type; | 219 extern ProcessType g_process_type; |
| 213 | 220 |
| 214 } // namespace install_static | 221 } // namespace install_static |
| 215 | 222 |
| 216 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ | 223 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ |
| OLD | NEW |