Chromium Code Reviews| 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 "chrome/browser/metrics/chrome_metrics_service_accessor.h" | 5 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/metrics/metrics_service_accessor.h" | |
|
Alexei Svitkine (slow)
2014/07/30 21:33:31
Nit: This include is unnecessary.
megjablon
2014/07/30 21:42:50
Done.
| |
| 9 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
| 10 #include "components/metrics/metrics_service.h" | 11 #include "components/metrics/metrics_service.h" |
| 11 | 12 |
| 12 #if defined(OS_CHROMEOS) | 13 #if defined(OS_CHROMEOS) |
| 13 #include "chrome/browser/chromeos/settings/cros_settings.h" | 14 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 14 #endif | 15 #endif |
| 15 | 16 |
| 16 // static | 17 // static |
| 17 bool ChromeMetricsServiceAccessor::IsMetricsReportingEnabled() { | 18 bool ChromeMetricsServiceAccessor::IsMetricsReportingEnabled() { |
| 18 bool result = false; | 19 bool result = false; |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 39 // Android has its own settings for metrics / crash uploading. | 40 // Android has its own settings for metrics / crash uploading. |
| 40 const PrefService* prefs = g_browser_process->local_state(); | 41 const PrefService* prefs = g_browser_process->local_state(); |
| 41 return prefs->GetBoolean(prefs::kCrashReportingEnabled); | 42 return prefs->GetBoolean(prefs::kCrashReportingEnabled); |
| 42 #else | 43 #else |
| 43 return ChromeMetricsServiceAccessor::IsMetricsReportingEnabled(); | 44 return ChromeMetricsServiceAccessor::IsMetricsReportingEnabled(); |
| 44 #endif | 45 #endif |
| 45 #else | 46 #else |
| 46 return false; | 47 return false; |
| 47 #endif | 48 #endif |
| 48 } | 49 } |
| 50 | |
| 51 // static | |
| 52 bool ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial( | |
| 53 const std::string& trial, const std::string& group) { | |
|
Alexei Svitkine (slow)
2014/07/30 21:33:31
Nit: 1 param per line if first param is on a new l
megjablon
2014/07/30 21:42:50
Done.
| |
| 54 return MetricsServiceAccessor::RegisterSyntheticFieldTrial( | |
| 55 g_browser_process->metrics_service(), trial, group); | |
| 56 } | |
| OLD | NEW |