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