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

Side by Side Diff: components/metrics/metrics_service_accessor.cc

Issue 1651203002: Update components for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « components/metrics/metrics_service.cc ('k') | components/metrics/metrics_service_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 4
5 #include "components/metrics/metrics_service_accessor.h" 5 #include "components/metrics/metrics_service_accessor.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/prefs/pref_service.h"
10 #include "components/metrics/metrics_pref_names.h" 9 #include "components/metrics/metrics_pref_names.h"
11 #include "components/metrics/metrics_service.h" 10 #include "components/metrics/metrics_service.h"
11 #include "components/prefs/pref_service.h"
12 #include "components/variations/metrics_util.h" 12 #include "components/variations/metrics_util.h"
13 13
14 namespace metrics { 14 namespace metrics {
15 15
16 // static 16 // static
17 bool MetricsServiceAccessor::IsMetricsReportingEnabled( 17 bool MetricsServiceAccessor::IsMetricsReportingEnabled(
18 PrefService* pref_service) { 18 PrefService* pref_service) {
19 return IsMetricsReportingEnabledWithPrefValue( 19 return IsMetricsReportingEnabledWithPrefValue(
20 pref_service->GetBoolean(prefs::kMetricsReportingEnabled)); 20 pref_service->GetBoolean(prefs::kMetricsReportingEnabled));
21 } 21 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 uint32_t group_name_hash) { 61 uint32_t group_name_hash) {
62 if (!metrics_service) 62 if (!metrics_service)
63 return false; 63 return false;
64 64
65 variations::SyntheticTrialGroup trial_group(trial_name_hash, group_name_hash); 65 variations::SyntheticTrialGroup trial_group(trial_name_hash, group_name_hash);
66 metrics_service->RegisterSyntheticFieldTrial(trial_group); 66 metrics_service->RegisterSyntheticFieldTrial(trial_group);
67 return true; 67 return true;
68 } 68 }
69 69
70 } // namespace metrics 70 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/metrics_service.cc ('k') | components/metrics/metrics_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698