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

Unified Diff: src/platform/metrics/metrics_daemon.h

Issue 2079007: Add metrics library tests. Some metrics daemon API cleanup. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: A bit more cleanup. 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/Makefile ('k') | src/platform/metrics/metrics_daemon.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/metrics/metrics_daemon.h
diff --git a/src/platform/metrics/metrics_daemon.h b/src/platform/metrics/metrics_daemon.h
index 3aeaaaaf9659fc39486196212a005ab78ea3d4f5..ba9e13c846121097c0dc4e7693c85aff1fb010a9 100644
--- a/src/platform/metrics/metrics_daemon.h
+++ b/src/platform/metrics/metrics_daemon.h
@@ -30,6 +30,9 @@ class MetricsDaemon {
usemon_source_(NULL) {}
~MetricsDaemon() {}
+ // Initializes.
+ void Init(bool testing, MetricsLibraryInterface* metrics_lib);
+
// Does all the work. If |run_as_daemon| is true, daemonizes by
// forking.
void Run(bool run_as_daemon);
@@ -48,8 +51,8 @@ class MetricsDaemon {
FRIEND_TEST(MetricsDaemonTest, NetStateChangedSimpleDrop);
FRIEND_TEST(MetricsDaemonTest, NetStateChangedSuspend);
FRIEND_TEST(MetricsDaemonTest, PowerStateChanged);
- FRIEND_TEST(MetricsDaemonTest, PublishMetric);
FRIEND_TEST(MetricsDaemonTest, ScreenSaverStateChanged);
+ FRIEND_TEST(MetricsDaemonTest, SendMetric);
FRIEND_TEST(MetricsDaemonTest, SessionStateChanged);
FRIEND_TEST(MetricsDaemonTest, SetUserActiveStateSendOnLogin);
FRIEND_TEST(MetricsDaemonTest, SetUserActiveStateSendOnMonitor);
@@ -119,9 +122,6 @@ class MetricsDaemon {
// Array of user session states.
static const char* kSessionStates_[kNumberSessionStates];
- // Initializes.
- void Init(bool testing, MetricsLibraryInterface* metrics_lib);
-
// Creates the event loop and enters it.
void Loop();
@@ -188,11 +188,11 @@ class MetricsDaemon {
// Unschedules a scheduled use monitor, if any.
void UnscheduleUseMonitor();
- // Sends a stat to Chrome for transport to UMA (or prints it for
- // testing). See MetricsLibrary::SendToChrome in metrics_library.h
- // for a description of the arguments.
- void PublishMetric(const char* name, int sample,
- int min, int max, int nbuckets);
+ // Sends a regular (exponential) histogram sample to Chrome for
+ // transport to UMA. See MetricsLibrary::SendToUMA in
+ // metrics_library.h for a description of the arguments.
+ void SendMetric(const std::string& name, int sample,
+ int min, int max, int nbuckets);
// Test mode.
bool testing_;
« no previous file with comments | « src/platform/metrics/Makefile ('k') | src/platform/metrics/metrics_daemon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698