Index: metrics_library.cc |
diff --git a/metrics_library.cc b/metrics_library.cc |
index f720972c22f16b9385dd81c14555d3bd7ce88918..05e63acff5fd32861647adeefd80b450050863b1 100644 |
--- a/metrics_library.cc |
+++ b/metrics_library.cc |
@@ -221,7 +221,6 @@ bool MetricsLibrary::SendToUMA(const string& name, int sample, |
FormatChromeMessage(kBufferSize, message, |
"histogram%c%s %d %d %d %d", '\0', |
name.c_str(), sample, min, max, nbuckets); |
- |
if (message_length < 0) |
return false; |
@@ -237,7 +236,19 @@ bool MetricsLibrary::SendEnumToUMA(const std::string& name, int sample, |
FormatChromeMessage(kBufferSize, message, |
"linearhistogram%c%s %d %d", '\0', |
name.c_str(), sample, max); |
+ if (message_length < 0) |
+ return false; |
+ // Send the message. |
+ return SendMessageToChrome(message_length, message); |
+} |
+ |
+bool MetricsLibrary::SendUserActionToUMA(const std::string& action) { |
+ // Format the message. |
+ char message[kBufferSize]; |
+ int32_t message_length = |
+ FormatChromeMessage(kBufferSize, message, |
+ "useraction%c%s", '\0', action.c_str()); |
if (message_length < 0) |
return false; |