Add support for user actions to the metrics library and the metrics clients.
BUG=10696
TEST=unit tests, tested on the device through metrics_client and inspecting
the uma-events file.
Change-Id: Ie39dd8b5ab968c328993076369a4ba14cb7fcd81
Review URL: http://codereview.chromium.org/6094010
diff --git a/metrics/metrics_library.h b/metrics/metrics_library.h
index fb31c20..b9b817a 100644
--- a/metrics/metrics_library.h
+++ b/metrics/metrics_library.h
@@ -69,6 +69,15 @@
// normal, while 100 is high).
bool SendEnumToUMA(const std::string& name, int sample, int max);
+ // Sends a user action to Chrome for transport to UMA and returns true on
+ // success. This method results in the equivalent of an asynchronous
+ // non-blocking RPC to UserMetrics::RecordAction (see the comments in
+ // chrome/browser/chromeos/external_metrics.cc and
+ // chrome/browser/metrics/user_metrics.h on how to register new user actions).
+ //
+ // |action| is the user-generated event (e.g., "MuteKeyPressed").
+ bool SendUserActionToUMA(const std::string& action);
+
// Sends to Autotest and returns true on success.
static bool SendToAutotest(const std::string& name, int value);