OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ABOUT_FLAGS_H_ | 5 #ifndef CHROME_BROWSER_ABOUT_FLAGS_H_ |
6 #define CHROME_BROWSER_ABOUT_FLAGS_H_ | 6 #define CHROME_BROWSER_ABOUT_FLAGS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 void ResetAllFlags(flags_ui::FlagsStorage* flags_storage); | 81 void ResetAllFlags(flags_ui::FlagsStorage* flags_storage); |
82 | 82 |
83 // Sends UMA stats about experimental flag usage. This should be called once per | 83 // Sends UMA stats about experimental flag usage. This should be called once per |
84 // startup. | 84 // startup. |
85 void RecordUMAStatistics(flags_ui::FlagsStorage* flags_storage); | 85 void RecordUMAStatistics(flags_ui::FlagsStorage* flags_storage); |
86 | 86 |
87 // Returns the UMA id for the specified switch name. | 87 // Returns the UMA id for the specified switch name. |
88 base::HistogramBase::Sample GetSwitchUMAId(const std::string& switch_name); | 88 base::HistogramBase::Sample GetSwitchUMAId(const std::string& switch_name); |
89 | 89 |
90 // Sends stats (as UMA histogram) about a set of command line |flags| in | 90 // Sends stats (as UMA histogram) about a set of command line |flags| in |
91 // a histogram, with an enum value for each flag in |flags|, based on the | 91 // a histogram, with an enum value for each flag in |switches| and |features|, |
92 // hash of the flag name. | 92 // based on the hash of the flag name. |
93 void ReportAboutFlagsHistogram(const std::string& uma_histogram_name, | 93 void ReportAboutFlagsHistogram(const std::string& uma_histogram_name, |
94 const std::set<std::string>& flags); | 94 const std::set<std::string>& switches, |
| 95 const std::set<std::string>& features); |
95 | 96 |
96 namespace testing { | 97 namespace testing { |
97 | 98 |
98 // Returns the global set of feature entries. | 99 // Returns the global set of feature entries. |
99 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count); | 100 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count); |
100 | 101 |
101 // This value is reported as switch histogram ID if switch name has unknown | 102 // This value is reported as switch histogram ID if switch name has unknown |
102 // format. | 103 // format. |
103 extern const base::HistogramBase::Sample kBadSwitchFormatHistogramId; | 104 extern const base::HistogramBase::Sample kBadSwitchFormatHistogramId; |
104 | 105 |
105 } // namespace testing | 106 } // namespace testing |
106 | 107 |
107 } // namespace about_flags | 108 } // namespace about_flags |
108 | 109 |
109 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_ | 110 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_ |
OLD | NEW |