Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(652)

Unified Diff: src/platform/metrics/metrics_library.cc

Issue 2049007: Start transition the metrics library to non-static API. Use gmock in tests. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: Break down tests to avoid explicit metrics lib mock checkpoints. Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/metrics/metrics_library.h ('k') | src/platform/metrics/metrics_library_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/metrics/metrics_library.cc
diff --git a/src/platform/metrics/metrics_library.cc b/src/platform/metrics/metrics_library.cc
index 95e78b2275b39515b8f54ef493296098d4af8c6d..2accb1ae830ecbb7ad0b5a73ec9e273c4d170c2a 100644
--- a/src/platform/metrics/metrics_library.cc
+++ b/src/platform/metrics/metrics_library.cc
@@ -121,6 +121,9 @@ static int32_t FormatChromeMessage(int32_t buffer_size, char *buffer,
return message_length;
}
+void MetricsLibrary::Init() {
+}
+
// static
bool MetricsLibrary::SendToAutotest(const string& name, int value) {
FILE *autotest_file = fopen(kAutotestPath, "a+");
@@ -151,6 +154,11 @@ bool MetricsLibrary::SendToChrome(const string& name, int sample,
return SendMessageToChrome(message_length, message);
}
+bool MetricsLibrary::SendToUMA(const string& name, int sample,
+ int min, int max, int nbuckets) {
+ return SendToChrome(name, sample, min, max, nbuckets);
+}
+
//static
bool MetricsLibrary::SendEnumToChrome(const std::string& name, int sample,
int max) {
@@ -167,3 +175,8 @@ bool MetricsLibrary::SendEnumToChrome(const std::string& name, int sample,
// Send the message.
return SendMessageToChrome(message_length, message);
}
+
+bool MetricsLibrary::SendEnumToUMA(const std::string& name, int sample,
+ int max) {
+ return SendEnumToChrome(name, sample, max);
+}
« no previous file with comments | « src/platform/metrics/metrics_library.h ('k') | src/platform/metrics/metrics_library_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698