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 COMPONENTS_METRICS_METRICS_SERVICE_ACCESSOR_H_ | 5 #ifndef COMPONENTS_METRICS_METRICS_SERVICE_ACCESSOR_H_ |
6 #define COMPONENTS_METRICS_METRICS_SERVICE_ACCESSOR_H_ | 6 #define COMPONENTS_METRICS_METRICS_SERVICE_ACCESSOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 11 matching lines...) Expand all Loading... | |
22 // specialization and enable access there by declaring friends. | 22 // specialization and enable access there by declaring friends. |
23 class MetricsServiceAccessor { | 23 class MetricsServiceAccessor { |
24 protected: | 24 protected: |
25 // Constructor declared as protected to enable inheritance. Descendants should | 25 // Constructor declared as protected to enable inheritance. Descendants should |
26 // disallow instantiation. | 26 // disallow instantiation. |
27 MetricsServiceAccessor() {} | 27 MetricsServiceAccessor() {} |
28 | 28 |
29 // Returns whether metrics reporting is enabled, using the value of the | 29 // Returns whether metrics reporting is enabled, using the value of the |
30 // kMetricsReportingEnabled pref in |pref_service| to determine whether user | 30 // kMetricsReportingEnabled pref in |pref_service| to determine whether user |
31 // has enabled reporting. | 31 // has enabled reporting. |
32 // NOTE: This method currently does not return the correct value on ChromeOS | 32 // NOTE: This method currently does not return the correct value on Android |
Rahul Chaturvedi
2016/09/16 23:11:04
Did you mean to change this comment?
michaelpg
2016/09/16 23:51:56
yes, it's outdated -- it was fixed for Chrome OS i
Rahul Chaturvedi
2016/09/19 18:11:09
Acknowledged.
| |
33 // and Android due to http://crbug.com/362192 and http://crbug.com/532084. See | 33 // due to http://crbug.com/362192 and http://crbug.com/532084. See |
34 // ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(). | 34 // ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(). |
35 static bool IsMetricsReportingEnabled(PrefService* pref_service); | 35 static bool IsMetricsReportingEnabled(PrefService* pref_service); |
36 | 36 |
37 // Returns whether metrics reporting is enabled, using the value of | 37 // Returns whether metrics reporting is enabled, using the value of |
38 // |enabled_in_prefs| to determine whether the user has enabled reporting. | 38 // |enabled_in_prefs| to determine whether the user has enabled reporting. |
39 // Exists because kMetricsReportingEnabled is currently not used on all | 39 // Exists because kMetricsReportingEnabled is currently not used on all |
40 // platforms. | 40 // platforms. |
41 // TODO(gayane): Consolidate metric prefs on all platforms and eliminate this | 41 // TODO(gayane): Consolidate metric prefs on all platforms and eliminate this |
42 // method. http://crbug.com/362192, http://crbug.com/532084 | 42 // method. http://crbug.com/362192, http://crbug.com/532084 |
43 static bool IsMetricsReportingEnabledWithPrefValue(bool enabled_in_prefs); | 43 static bool IsMetricsReportingEnabledWithPrefValue(bool enabled_in_prefs); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 uint32_t trial_name_hash, | 75 uint32_t trial_name_hash, |
76 uint32_t group_name_hash); | 76 uint32_t group_name_hash); |
77 | 77 |
78 private: | 78 private: |
79 DISALLOW_COPY_AND_ASSIGN(MetricsServiceAccessor); | 79 DISALLOW_COPY_AND_ASSIGN(MetricsServiceAccessor); |
80 }; | 80 }; |
81 | 81 |
82 } // namespace metrics | 82 } // namespace metrics |
83 | 83 |
84 #endif // COMPONENTS_METRICS_METRICS_SERVICE_ACCESSOR_H_ | 84 #endif // COMPONENTS_METRICS_METRICS_SERVICE_ACCESSOR_H_ |
OLD | NEW |