Chromium Code Reviews| Index: chrome/browser/about_flags.h |
| diff --git a/chrome/browser/about_flags.h b/chrome/browser/about_flags.h |
| index 55859db985106a932db1ab706f74d13f416c2512..f463d25da1ea04ccdce6be950fc30a0cab1dadd5 100644 |
| --- a/chrome/browser/about_flags.h |
| +++ b/chrome/browser/about_flags.h |
| @@ -6,6 +6,7 @@ |
| #define CHROME_BROWSER_ABOUT_FLAGS_H_ |
| #include <map> |
| +#include <set> |
| #include <string> |
| #include "base/command_line.h" |
| @@ -21,6 +22,10 @@ namespace about_flags { |
| class FlagsStorage; |
| +// This value is reported as switch histogram ID if switch name has unknown |
| +// format. |
| +extern const uint32_t kBadSwitchFormatHistogramId; |
| + |
| // Enumeration of OSs. |
| // This is exposed only for testing. |
| enum { kOsMac = 1 << 0, kOsWin = 1 << 1, kOsLinux = 1 << 2 , kOsCrOS = 1 << 3, |
| @@ -117,9 +122,12 @@ void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
| // Compares a set of switches of the two provided command line objects and |
| // returns true if they are the same and false otherwise. |
| +// If |out_difference| is not NULL, it's filled with set_symmetric_difference |
| +// between sets. |
| bool AreSwitchesIdenticalToCurrentCommandLine( |
| const base::CommandLine& new_cmdline, |
| - const base::CommandLine& active_cmdline); |
| + const base::CommandLine& active_cmdline, |
| + std::set<CommandLine::StringType>* out_difference); |
| // Differentiate between generic flags available on a per session base and flags |
| // that influence the whole machine and can be said by the admin only. This flag |
| @@ -160,6 +168,19 @@ int GetCurrentPlatform(); |
| // startup. |
| void RecordUMAStatistics(FlagsStorage* flags_storage); |
| +// Returns the UMA id for the specified switch name. |
| +uint32 GetSwitchUMAId(const std::string& switch_name); |
|
Ilya Sherman
2014/08/05 20:14:46
Please be consistent about the integer types you u
Alexander Alekseev
2014/08/07 23:24:56
Done.
|
| + |
| +// Sends stats (as UMA histogram) about command_line_difference. |
| +// This is used on ChromeOS to report flags that lead to browser restart. |
| +// |command_line_difference| is the result of |
| +// AreSwitchesIdenticalToCurrentCommandLine(). |
| +void ReportCustomFlags(const std::string& uma_histogram_hame, |
| + const std::set<std::string>& command_line_difference); |
| + |
| +// Returns list of all command-line switches used in flags. |
| +std::set<std::string> GetAllSwitchesForTesting(); |
| + |
| namespace testing { |
| // Clears internal global state, for unit tests. |