OLD | NEW |
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 Loading... |
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 |
OLD | NEW |