Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Unified Diff: components/metrics/metrics_service_accessor.cc

Issue 2351873002: Clean up UMA 3g experiment and unify metrics enabled pref for Android (Closed)
Patch Set: remove optimization param Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/metrics/metrics_service_accessor.h ('k') | components/metrics/net/cellular_logic_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_service_accessor.cc
diff --git a/components/metrics/metrics_service_accessor.cc b/components/metrics/metrics_service_accessor.cc
index de99a258680357eb0be174b0c5e6508c7969008d..786895b40a1584ade9a51b80a8f5a300a777991b 100644
--- a/components/metrics/metrics_service_accessor.cc
+++ b/components/metrics/metrics_service_accessor.cc
@@ -16,20 +16,13 @@ namespace metrics {
// static
bool MetricsServiceAccessor::IsMetricsReportingEnabled(
PrefService* pref_service) {
- return IsMetricsReportingEnabledWithPrefValue(
- pref_service->GetBoolean(prefs::kMetricsReportingEnabled));
-}
-
-// static
-bool MetricsServiceAccessor::IsMetricsReportingEnabledWithPrefValue(
- bool enabled_in_prefs) {
#if defined(GOOGLE_CHROME_BUILD)
// In official builds, disable metrics when reporting field trials are
// forced; otherwise, use the value of the user's preference to determine
// whether to enable metrics reporting.
return !base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kForceFieldTrials) &&
- enabled_in_prefs;
+ pref_service->GetBoolean(prefs::kMetricsReportingEnabled);
#else
// In non-official builds, disable metrics reporting completely.
return false;
« no previous file with comments | « components/metrics/metrics_service_accessor.h ('k') | components/metrics/net/cellular_logic_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698