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

Unified Diff: chromecast/base/metrics/cast_metrics_helper.h

Issue 786233003: Add UpdateCurrentAppInfo() interface to record info about current app, including (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
Index: chromecast/base/metrics/cast_metrics_helper.h
diff --git a/chromecast/base/metrics/cast_metrics_helper.h b/chromecast/base/metrics/cast_metrics_helper.h
index 5e76b796580f2195d136e828cfcfdc7e18eeee48..9583c181c392b6d389da6ff0bf68152be2dd6d29 100644
--- a/chromecast/base/metrics/cast_metrics_helper.h
+++ b/chromecast/base/metrics/cast_metrics_helper.h
@@ -53,6 +53,10 @@ class CastMetricsHelper {
// This function stores the name and startup time of the active application.
virtual void TagAppStart(const std::string& app_name);
+ // This function update the info of current active application.
gunsch 2014/12/10 16:54:18 Remove "This function" "update" --> "Updates" "o
gfhuang 2014/12/10 22:02:41 Done.
+ virtual void UpdateCurrentAppInfo(const std::string& app_id,
+ const std::string& session_id,
+ const std::string& sdk_version);
// Logs UMA record for media play/pause user actions.
virtual void LogMediaPlay();
@@ -78,9 +82,14 @@ class CastMetricsHelper {
int delayed_frames, int error_frames);
// Returns metrics name with app name between prefix and suffix.
+ // This is used by histograms.
virtual std::string GetMetricsNameWithAppName(
const std::string& prefix,
const std::string& suffix) const;
+ // Returns metrics name with app_id/session_id/sdk_version.
+ // This is used by actions, so far MediaPlay/MediaPause only.
gunsch 2014/12/10 16:54:19 This comment is bound to become obsolete. Can you
gfhuang 2014/12/10 22:02:41 Done.
+ virtual std::string GetMetricsNameWithAppInfo(
gunsch 2014/12/10 22:43:58 does anyone call this externally? seems to me like
+ const std::string& action_name) const;
// Provides a MetricsSink instance to delegate UMA event logging.
// Once the delegate interface is set, CastMetricsHelper will not log UMA
@@ -118,6 +127,9 @@ class CastMetricsHelper {
// Currently running app name. Used to construct histogram name.
std::string app_name_;
+ std::string app_id_;
+ std::string session_id_;
+ std::string sdk_version_;
// Whether a new app start time has been stored but not recorded.
// After the startup time has been used to generate an UMA event,
« no previous file with comments | « no previous file | chromecast/base/metrics/cast_metrics_helper.cc » ('j') | chromecast/base/metrics/cast_metrics_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698