| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/metrics/ios_chrome_metrics_service_accessor.h" | 5 #include "ios/chrome/browser/metrics/ios_chrome_metrics_service_accessor.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/prefs/pref_service.h" | 9 #include "components/prefs/pref_service.h" |
| 10 #include "ios/chrome/browser/application_context.h" | 10 #include "ios/chrome/browser/application_context.h" |
| 11 | 11 |
| 12 // static | 12 // static |
| 13 bool IOSChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled() { | 13 bool IOSChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled() { |
| 14 return IsMetricsReportingEnabled(GetApplicationContext()->GetLocalState()); | 14 return IsMetricsReportingEnabled(GetApplicationContext()->GetLocalState()); |
| 15 } | 15 } |
| 16 | 16 |
| 17 // static | 17 // static |
| 18 bool IOSChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial( | 18 bool IOSChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial( |
| 19 const std::string& trial_name, | 19 const std::string& trial_name, |
| 20 const std::string& group_name) { | 20 const std::string& group_name) { |
| 21 return metrics::MetricsServiceAccessor::RegisterSyntheticFieldTrial( | 21 return metrics::MetricsServiceAccessor::RegisterSyntheticFieldTrial( |
| 22 GetApplicationContext()->GetMetricsService(), trial_name, group_name); | 22 GetApplicationContext()->GetMetricsService(), trial_name, group_name); |
| 23 } | 23 } |
| 24 | 24 |
| 25 // static | 25 // static |
| 26 bool IOSChromeMetricsServiceAccessor::RegisterSyntheticFieldTrialWithNameHash( | 26 bool IOSChromeMetricsServiceAccessor::RegisterSyntheticFieldTrialWithNameHash( |
| 27 uint32_t trial_name_hash, | 27 uint32_t trial_name_hash, |
| 28 const std::string& group_name) { | 28 const std::string& group_name) { |
| 29 return metrics::MetricsServiceAccessor:: | 29 return metrics::MetricsServiceAccessor:: |
| 30 RegisterSyntheticFieldTrialWithNameHash( | 30 RegisterSyntheticFieldTrialWithNameHash( |
| 31 GetApplicationContext()->GetMetricsService(), trial_name_hash, | 31 GetApplicationContext()->GetMetricsService(), trial_name_hash, |
| 32 group_name); | 32 group_name); |
| 33 } | 33 } |
| OLD | NEW |