Commit fe0ff89e authored by Boris Sazonov's avatar Boris Sazonov Committed by Commit Bot

[Unity] Use pref to get UMA state for unified consent

This CL changes ChromeUnifiedConsentClient to use
kMetricsReportingEnabled pref to check whether UMA reporting is enabled,
as IsMetricsAndCrashReportingEnabled always returns false on
non-official builds, forcing unified consent to be off.

Bug: 814728
Change-Id: Ie39ca8d23cdc1fbb757a5ec74c719092c758a1d6
Reviewed-on: https://chromium-review.googlesource.com/1183679Reviewed-by: default avatarThomas Tangl <tangltom@chromium.org>
Reviewed-by: default avatarBrian White <bcwhite@chromium.org>
Commit-Queue: Boris Sazonov <bsazonov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585053}
parent 40d057eb
......@@ -48,8 +48,10 @@ ChromeUnifiedConsentServiceClient::GetServiceState(Service service) {
enabled = pref_service_->GetBoolean(prefs::kAlternateErrorPagesEnabled);
break;
case Service::kMetricsReporting:
enabled =
ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled();
// Uploads are disabled for non-official builds, but UnifiedConsentService
// only cares whether the user has manually disabled metrics reporting.
enabled = g_browser_process->local_state()->GetBoolean(
metrics::prefs::kMetricsReportingEnabled);
break;
case Service::kNetworkPrediction:
enabled = pref_service_->GetInteger(prefs::kNetworkPredictionOptions) ==
......
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