Add support for linear/enumeration histograms.

Review URL: http://codereview.chromium.org/1747008
diff --git a/metrics/metrics_library.cc b/metrics/metrics_library.cc
index 681cf96..95e78b2 100644
--- a/metrics/metrics_library.cc
+++ b/metrics/metrics_library.cc
@@ -150,3 +150,20 @@
   // Send the message.
   return SendMessageToChrome(message_length, message);
 }
+
+//static
+bool MetricsLibrary::SendEnumToChrome(const std::string& name, int sample,
+                                      int max) {
+  // Format the message.
+  char message[kBufferSize];
+  int32_t message_length =
+      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);
+}