Index: chrome/browser/about_flags.h |
diff --git a/chrome/browser/about_flags.h b/chrome/browser/about_flags.h |
index 55859db985106a932db1ab706f74d13f416c2512..59b2db14d2c0a93106d53677ab8f6b40c37092ce 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 swtich histogram ID if switch name has unknown |
sky
2014/08/05 16:49:14
swtich->switch
Alexander Alekseev
2014/08/05 17:03:07
Done.
|
+// 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 commans-line switch UMA ID, which is used in ReportCustomFlags(). |
sky
2014/08/05 16:49:14
Returns the UMA id for the specified switch name.
Alexander Alekseev
2014/08/05 17:03:07
Done.
|
+uint32 GetSwitchUMAId(const std::string& switch_name); |
+ |
+// Sends stats (as UMA histogram) about command_line_difference. |
+// This is used on ChromeOS to report flags that lead to browser restart. |
sky
2014/08/05 16:49:14
If this is only for chromeos, can we move it into
Alexander Alekseev
2014/08/05 17:03:07
It was there in the first versions of this CL, but
|
+// |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. |