Skip to content

Commit

Permalink
Fallback to app_name_ when app_id_ is empty, which could happen before
Browse files Browse the repository at this point in the history
UpdateCurrentAppInfo or in AndroidTV builds.

Review URL: https://codereview.chromium.org/794213003

Cr-Commit-Position: refs/heads/master@{#308598}
  • Loading branch information
gfhuang authored and Commit bot committed Dec 16, 2014
1 parent da8e8a8 commit a6fbe42
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions chromecast/base/metrics/cast_metrics_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,19 @@ void CastMetricsHelper::UpdateCurrentAppInfo(const std::string& app_id,
void CastMetricsHelper::LogMediaPlay() {
MAKE_SURE_THREAD(LogMediaPlay);
RecordSimpleAction(EncodeAppInfoIntoMetricsName(
"MediaPlay", app_id_, session_id_, sdk_version_));
"MediaPlay",
app_id_.empty() ? app_name_ : app_id_,
session_id_,
sdk_version_));
}

void CastMetricsHelper::LogMediaPause() {
MAKE_SURE_THREAD(LogMediaPause);
RecordSimpleAction(EncodeAppInfoIntoMetricsName(
"MediaPause", app_id_, session_id_, sdk_version_));
"MediaPause",
app_id_.empty() ? app_name_ : app_id_,
session_id_,
sdk_version_));
}

void CastMetricsHelper::LogTimeToDisplayVideo() {
Expand Down

0 comments on commit a6fbe42

Please sign in to comment.