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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 // Returns true if the current executable is currently in the chosen sample that | 82 // Returns true if the current executable is currently in the chosen sample that |
83 // will report stats and crashes. | 83 // will report stats and crashes. |
84 bool GetCollectStatsInSample(); | 84 bool GetCollectStatsInSample(); |
85 | 85 |
86 // Sets the registry value used for checking if Chrome is in the chosen sample | 86 // Sets the registry value used for checking if Chrome is in the chosen sample |
87 // that will report stats and crashes. Returns true if writing was successful. | 87 // that will report stats and crashes. Returns true if writing was successful. |
88 bool SetCollectStatsInSample(bool in_sample); | 88 bool SetCollectStatsInSample(bool in_sample); |
89 | 89 |
90 // Returns true if if usage stats reporting is controlled by a mandatory | 90 // Returns true if if usage stats reporting is controlled by a mandatory |
91 // policy. |metrics_is_enforced_by_policy| will be set to true accordingly. | 91 // policy. |crash_reporting_enabled| determines whether it's enabled (true) or |
92 // TODO(ananta) | 92 // disabled (false). |
93 // Make this function private to install_util. | 93 bool ReportingIsEnforcedByPolicy(bool* crash_reporting_enabled); |
94 bool ReportingIsEnforcedByPolicy(bool* metrics_is_enforced_by_policy); | |
95 | 94 |
96 // Initializes |g_process_type| which stores whether or not the current | 95 // Initializes |g_process_type| which stores whether or not the current |
97 // process is the main browser process. | 96 // process is the main browser process. |
98 void InitializeProcessType(); | 97 void InitializeProcessType(); |
99 | 98 |
100 // Returns true if invoked in a Chrome process other than the main browser | 99 // Returns true if invoked in a Chrome process other than the main browser |
101 // process. False otherwise. | 100 // process. False otherwise. |
102 bool IsNonBrowserProcess(); | 101 bool IsNonBrowserProcess(); |
103 | 102 |
104 // Populates |result| with the default User Data directory for the current | 103 // Populates |result| with the default User Data directory for the current |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 // value of the |switch_name| passed in. | 215 // value of the |switch_name| passed in. |
217 std::string GetSwitchValueFromCommandLine(const std::string& command_line, | 216 std::string GetSwitchValueFromCommandLine(const std::string& command_line, |
218 const std::string& switch_name); | 217 const std::string& switch_name); |
219 | 218 |
220 // Caches the |ProcessType| of the current process. | 219 // Caches the |ProcessType| of the current process. |
221 extern ProcessType g_process_type; | 220 extern ProcessType g_process_type; |
222 | 221 |
223 } // namespace install_static | 222 } // namespace install_static |
224 | 223 |
225 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ | 224 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ |
OLD | NEW |