| 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 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 } | 49 } |
| 50 | 50 |
| 51 namespace safe_browsing { | 51 namespace safe_browsing { |
| 52 class DownloadSBClient; | 52 class DownloadSBClient; |
| 53 class IncidentReportingService; | 53 class IncidentReportingService; |
| 54 class SafeBrowsingService; | 54 class SafeBrowsingService; |
| 55 class SafeBrowsingUIManager; | 55 class SafeBrowsingUIManager; |
| 56 class SRTFetcher; | 56 class SRTFetcher; |
| 57 } | 57 } |
| 58 | 58 |
| 59 namespace settings { |
| 60 class SystemHandler; |
| 61 } |
| 62 |
| 59 namespace speech { | 63 namespace speech { |
| 60 class ChromeSpeechRecognitionManagerDelegate; | 64 class ChromeSpeechRecognitionManagerDelegate; |
| 61 } | 65 } |
| 62 | 66 |
| 63 namespace system_logs { | 67 namespace system_logs { |
| 64 class ChromeInternalLogSource; | 68 class ChromeInternalLogSource; |
| 65 } | 69 } |
| 66 | 70 |
| 67 // This class limits and documents access to metrics service helper methods. | 71 // This class limits and documents access to metrics service helper methods. |
| 68 // Since these methods are private, each user has to be explicitly declared | 72 // Since these methods are private, each user has to be explicitly declared |
| (...skipping 18 matching lines...) Expand all Loading... |
| 87 friend bool prerender::IsOmniboxEnabled(Profile* profile); | 91 friend bool prerender::IsOmniboxEnabled(Profile* profile); |
| 88 friend class safe_browsing::IncidentReportingService; | 92 friend class safe_browsing::IncidentReportingService; |
| 89 friend class speech::ChromeSpeechRecognitionManagerDelegate; | 93 friend class speech::ChromeSpeechRecognitionManagerDelegate; |
| 90 friend class StackSamplingConfiguration; | 94 friend class StackSamplingConfiguration; |
| 91 friend class system_logs::ChromeInternalLogSource; | 95 friend class system_logs::ChromeInternalLogSource; |
| 92 friend class UmaSessionStats; | 96 friend class UmaSessionStats; |
| 93 friend class safe_browsing::SRTFetcher; | 97 friend class safe_browsing::SRTFetcher; |
| 94 friend class safe_browsing::DownloadSBClient; | 98 friend class safe_browsing::DownloadSBClient; |
| 95 friend class safe_browsing::SafeBrowsingService; | 99 friend class safe_browsing::SafeBrowsingService; |
| 96 friend class safe_browsing::SafeBrowsingUIManager; | 100 friend class safe_browsing::SafeBrowsingUIManager; |
| 101 friend class settings::SystemHandler; |
| 97 | 102 |
| 98 FRIEND_TEST_ALL_PREFIXES(ChromeMetricsServiceAccessorTest, | 103 FRIEND_TEST_ALL_PREFIXES(ChromeMetricsServiceAccessorTest, |
| 99 MetricsReportingEnabled); | 104 MetricsReportingEnabled); |
| 100 | 105 |
| 101 // Returns true if metrics reporting is enabled. | 106 // Returns true if metrics reporting is enabled. |
| 102 // TODO(gayane): Consolidate metric prefs on all platforms. | 107 // TODO(gayane): Consolidate metric prefs on all platforms. |
| 103 // http://crbug.com/362192, http://crbug.com/532084 | 108 // http://crbug.com/362192, http://crbug.com/532084 |
| 104 static bool IsMetricsAndCrashReportingEnabled(); | 109 static bool IsMetricsAndCrashReportingEnabled(); |
| 105 | 110 |
| 106 // Calls metrics::MetricsServiceAccessor::RegisterSyntheticFieldTrial() with | 111 // Calls metrics::MetricsServiceAccessor::RegisterSyntheticFieldTrial() with |
| 107 // g_browser_process->metrics_service(). See that function's declaration for | 112 // g_browser_process->metrics_service(). See that function's declaration for |
| 108 // details. | 113 // details. |
| 109 static bool RegisterSyntheticFieldTrial(const std::string& trial_name, | 114 static bool RegisterSyntheticFieldTrial(const std::string& trial_name, |
| 110 const std::string& group_name); | 115 const std::string& group_name); |
| 111 | 116 |
| 112 // Calls | 117 // Calls |
| 113 // metrics::MetricsServiceAccessor::RegisterSyntheticFieldTrialWithNameHash() | 118 // metrics::MetricsServiceAccessor::RegisterSyntheticFieldTrialWithNameHash() |
| 114 // with g_browser_process->metrics_service(). See that function's declaration | 119 // with g_browser_process->metrics_service(). See that function's declaration |
| 115 // for details. | 120 // for details. |
| 116 static bool RegisterSyntheticFieldTrialWithNameHash( | 121 static bool RegisterSyntheticFieldTrialWithNameHash( |
| 117 uint32_t trial_name_hash, | 122 uint32_t trial_name_hash, |
| 118 const std::string& group_name); | 123 const std::string& group_name); |
| 119 | 124 |
| 120 DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeMetricsServiceAccessor); | 125 DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeMetricsServiceAccessor); |
| 121 }; | 126 }; |
| 122 | 127 |
| 123 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_ACCESSOR_H_ | 128 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_ACCESSOR_H_ |
| OLD | NEW |