| 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 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_ACCESSOR_H_ | 5 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_ACCESSOR_H_ |
| 6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_ACCESSOR_H_ | 6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_ACCESSOR_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "chrome/browser/metrics/metrics_reporting_state.h" | 13 #include "chrome/browser/metrics/metrics_reporting_state.h" |
| 14 #include "chrome/browser/metrics/metrics_service_accessor.h" | 14 #include "chrome/browser/metrics/metrics_service_accessor.h" |
| 15 | 15 |
| 16 class ChromeExtensionDownloaderFactory; | 16 class ChromeExtensionDownloaderFactory; |
| 17 class PrefService; | |
| 18 class Profile; | 17 class Profile; |
| 19 | 18 |
| 20 namespace { | 19 namespace { |
| 21 class CrashesDOMHandler; | 20 class CrashesDOMHandler; |
| 22 class FlashDOMHandler; | 21 class FlashDOMHandler; |
| 23 } | 22 } |
| 24 | 23 |
| 25 namespace component_updater { | |
| 26 class ComponentUpdateService; | |
| 27 void RegisterSwReporterComponent(ComponentUpdateService* cus, | |
| 28 PrefService* prefs); | |
| 29 } | |
| 30 | |
| 31 namespace extensions { | 24 namespace extensions { |
| 32 class MetricsPrivateGetIsCrashReportingEnabledFunction; | 25 class MetricsPrivateGetIsCrashReportingEnabledFunction; |
| 33 } | 26 } |
| 34 | 27 |
| 35 namespace prerender { | 28 namespace prerender { |
| 36 bool IsOmniboxEnabled(Profile* profile); | 29 bool IsOmniboxEnabled(Profile* profile); |
| 37 } | 30 } |
| 38 | 31 |
| 39 namespace system_logs { | 32 namespace system_logs { |
| 40 class ChromeInternalLogSource; | 33 class ChromeInternalLogSource; |
| 41 } | 34 } |
| 42 | 35 |
| 43 namespace options { | 36 namespace options { |
| 44 class BrowserOptionsHandler; | 37 class BrowserOptionsHandler; |
| 45 } | 38 } |
| 46 | 39 |
| 47 // This class limits and documents access to metrics service helper methods. | 40 // This class limits and documents access to metrics service helper methods. |
| 48 // Since these methods are private, each user has to be explicitly declared | 41 // Since these methods are private, each user has to be explicitly declared |
| 49 // as a 'friend' below. | 42 // as a 'friend' below. |
| 50 class ChromeMetricsServiceAccessor : public MetricsServiceAccessor { | 43 class ChromeMetricsServiceAccessor : public MetricsServiceAccessor { |
| 51 private: | 44 private: |
| 52 friend void component_updater::RegisterSwReporterComponent( | |
| 53 component_updater::ComponentUpdateService* cus, | |
| 54 PrefService* prefs); | |
| 55 friend bool prerender::IsOmniboxEnabled(Profile* profile); | 45 friend bool prerender::IsOmniboxEnabled(Profile* profile); |
| 56 friend class ChromeExtensionDownloaderFactory; | 46 friend class ChromeExtensionDownloaderFactory; |
| 57 friend class ChromeRenderMessageFilter; | 47 friend class ChromeRenderMessageFilter; |
| 58 friend class ::CrashesDOMHandler; | 48 friend class ::CrashesDOMHandler; |
| 59 friend class DataReductionProxyChromeSettings; | 49 friend class DataReductionProxyChromeSettings; |
| 60 friend class extensions::MetricsPrivateGetIsCrashReportingEnabledFunction; | 50 friend class extensions::MetricsPrivateGetIsCrashReportingEnabledFunction; |
| 61 friend class ::FlashDOMHandler; | 51 friend class ::FlashDOMHandler; |
| 62 friend class system_logs::ChromeInternalLogSource; | 52 friend class system_logs::ChromeInternalLogSource; |
| 63 friend class UmaSessionStats; | 53 friend class UmaSessionStats; |
| 64 friend class options::BrowserOptionsHandler; | 54 friend class options::BrowserOptionsHandler; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 94 // Same as RegisterSyntheticFieldTrial above, but takes a hash for the trial | 84 // Same as RegisterSyntheticFieldTrial above, but takes a hash for the trial |
| 95 // name, rather than computing it from the string. | 85 // name, rather than computing it from the string. |
| 96 static bool RegisterSyntheticFieldTrialWithNameHash( | 86 static bool RegisterSyntheticFieldTrialWithNameHash( |
| 97 uint32_t trial_name_hash, | 87 uint32_t trial_name_hash, |
| 98 const std::string& group_name); | 88 const std::string& group_name); |
| 99 | 89 |
| 100 DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeMetricsServiceAccessor); | 90 DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeMetricsServiceAccessor); |
| 101 }; | 91 }; |
| 102 | 92 |
| 103 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_ACCESSOR_H_ | 93 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_ACCESSOR_H_ |
| OLD | NEW |