about_flags::ReportCustomFlags() should use signed 32-bit IDs.
On 32-bit architectures UMA Histogram IDs (enum
LoginCustomFlags) are negative. So HistogramBase::Sample
(which is int32_t) should be used.
BUG=408196
TEST=manual
Review URL: https://codereview.chromium.org/509923003
Cr-Commit-Position: refs/heads/master@{#293062}
diff --git a/chrome/browser/about_flags.h b/chrome/browser/about_flags.h
index 7a229a7..ed455a4e 100644
--- a/chrome/browser/about_flags.h
+++ b/chrome/browser/about_flags.h
@@ -12,6 +12,7 @@
#include <string>
#include "base/command_line.h"
+#include "base/metrics/histogram_base.h"
#include "base/strings/string16.h"
class PrefService;
@@ -26,7 +27,7 @@
// This value is reported as switch histogram ID if switch name has unknown
// format.
-extern const uint32_t kBadSwitchFormatHistogramId;
+extern const base::HistogramBase::Sample kBadSwitchFormatHistogramId;
// Enumeration of OSs.
// This is exposed only for testing.
@@ -171,7 +172,7 @@
void RecordUMAStatistics(FlagsStorage* flags_storage);
// Returns the UMA id for the specified switch name.
-uint32_t GetSwitchUMAId(const std::string& switch_name);
+base::HistogramBase::Sample 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.