| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // Reset all flags to the default state by clearing all flags. | 80 // Reset all flags to the default state by clearing all flags. |
| 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 command_line_difference. | 90 // Sends stats (as UMA histogram) about a set of command line |flags| in |
| 91 // This is used on ChromeOS to report flags that lead to browser restart. | 91 // a histogram, with an enum value for each flag in |flags|, based on the |
| 92 // |command_line_difference| is the result of | 92 // hash of the flag name. |
| 93 // AreSwitchesIdenticalToCurrentCommandLine(). | 93 void ReportAboutFlagsHistogram(const std::string& uma_histogram_name, |
| 94 void ReportCustomFlags(const std::string& uma_histogram_hame, | 94 const std::set<std::string>& flags); |
| 95 const std::set<std::string>& command_line_difference); | |
| 96 | 95 |
| 97 namespace testing { | 96 namespace testing { |
| 98 | 97 |
| 99 // Returns the global set of feature entries. | 98 // Returns the global set of feature entries. |
| 100 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count); | 99 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count); |
| 101 | 100 |
| 102 // This value is reported as switch histogram ID if switch name has unknown | 101 // This value is reported as switch histogram ID if switch name has unknown |
| 103 // format. | 102 // format. |
| 104 extern const base::HistogramBase::Sample kBadSwitchFormatHistogramId; | 103 extern const base::HistogramBase::Sample kBadSwitchFormatHistogramId; |
| 105 | 104 |
| 106 } // namespace testing | 105 } // namespace testing |
| 107 | 106 |
| 108 } // namespace about_flags | 107 } // namespace about_flags |
| 109 | 108 |
| 110 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_ | 109 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_ |
| OLD | NEW |