Commit c062afd5 authored by scottmg's avatar scottmg Committed by Commit bot

Fix argument name in install_static::ReportingIsEnforcedByPolicy to be not-misleading

The return value is whether it's enforced by policy, the out param is whether it's enabled (not whether it's enforced, which made it an awfully confusing name).

R=ananta@chromium.org, jwd@chromium.org

Review-Url: https://codereview.chromium.org/2279063002
Cr-Commit-Position: refs/heads/master@{#414712}
parent 4fe27f6f
...@@ -453,20 +453,20 @@ bool SetCollectStatsInSample(bool in_sample) { ...@@ -453,20 +453,20 @@ bool SetCollectStatsInSample(bool in_sample) {
in_sample ? 1 : 0); in_sample ? 1 : 0);
} }
bool ReportingIsEnforcedByPolicy(bool* metrics_is_enforced_by_policy) { bool ReportingIsEnforcedByPolicy(bool* crash_reporting_enabled) {
DWORD value = 0; DWORD value = 0;
// First, try HKLM. // First, try HKLM.
if (nt::QueryRegValueDWORD(nt::HKLM, kRegPathChromePolicy, if (nt::QueryRegValueDWORD(nt::HKLM, kRegPathChromePolicy,
kMetricsReportingEnabled, &value)) { kMetricsReportingEnabled, &value)) {
*metrics_is_enforced_by_policy = (value != 0); *crash_reporting_enabled = (value != 0);
return true; return true;
} }
// Second, try HKCU. // Second, try HKCU.
if (nt::QueryRegValueDWORD(nt::HKCU, kRegPathChromePolicy, if (nt::QueryRegValueDWORD(nt::HKCU, kRegPathChromePolicy,
kMetricsReportingEnabled, &value)) { kMetricsReportingEnabled, &value)) {
*metrics_is_enforced_by_policy = (value != 0); *crash_reporting_enabled = (value != 0);
return true; return true;
} }
......
...@@ -88,10 +88,9 @@ bool GetCollectStatsInSample(); ...@@ -88,10 +88,9 @@ bool GetCollectStatsInSample();
bool SetCollectStatsInSample(bool in_sample); bool SetCollectStatsInSample(bool in_sample);
// Returns true if if usage stats reporting is controlled by a mandatory // Returns true if if usage stats reporting is controlled by a mandatory
// policy. |metrics_is_enforced_by_policy| will be set to true accordingly. // policy. |crash_reporting_enabled| determines whether it's enabled (true) or
// TODO(ananta) // disabled (false).
// Make this function private to install_util. bool ReportingIsEnforcedByPolicy(bool* crash_reporting_enabled);
bool ReportingIsEnforcedByPolicy(bool* metrics_is_enforced_by_policy);
// Initializes |g_process_type| which stores whether or not the current // Initializes |g_process_type| which stores whether or not the current
// process is the main browser process. // process is the main browser process.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment