Index: chromecast/base/metrics/cast_metrics_helper.cc |
diff --git a/chromecast/base/metrics/cast_metrics_helper.cc b/chromecast/base/metrics/cast_metrics_helper.cc |
index 30f2810048cacb501b5a8968cdee10763e0ea1bf..30e24537cc290330262ada5081885ea232c897f0 100644 |
--- a/chromecast/base/metrics/cast_metrics_helper.cc |
+++ b/chromecast/base/metrics/cast_metrics_helper.cc |
@@ -128,6 +128,8 @@ void CastMetricsHelper::UpdateSDKInfo(const std::string& sdk_version) { |
void CastMetricsHelper::LogMediaPlay() { |
MAKE_SURE_THREAD(LogMediaPlay); |
+ if (app_id_.empty()) |
slan
2015/11/25 01:22:25
Did you consider setting a testing value for app_i
|
+ return; |
RecordSimpleAction(EncodeAppInfoIntoMetricsName( |
"MediaPlay", |
app_id_, |
@@ -137,6 +139,8 @@ void CastMetricsHelper::LogMediaPlay() { |
void CastMetricsHelper::LogMediaPause() { |
MAKE_SURE_THREAD(LogMediaPause); |
+ if (app_id_.empty()) |
+ return; |
RecordSimpleAction(EncodeAppInfoIntoMetricsName( |
"MediaPause", |
app_id_, |