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

Unified Diff: media/blink/watch_time_reporter.cc

Issue 2387293007: Register MediaPlayerRenderer service (Closed)
Patch Set: Typo. Created 4 years, 2 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 | « media/base/pipeline_metadata.h ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/watch_time_reporter.cc
diff --git a/media/blink/watch_time_reporter.cc b/media/blink/watch_time_reporter.cc
index 53310291f3af925ddf5b88b3f371aa6073c36a23..8bb71544d61b68ae454dbd1ac7971082b1da8507 100644
--- a/media/blink/watch_time_reporter.cc
+++ b/media/blink/watch_time_reporter.cc
@@ -38,8 +38,6 @@ WatchTimeReporter::WatchTimeReporter(bool has_audio,
get_media_time_cb_(get_media_time_cb) {
DCHECK(!get_media_time_cb_.is_null());
DCHECK(has_audio_ || has_video_);
- if (has_video_)
- DCHECK(!initial_video_size_.IsEmpty());
if (base::PowerMonitor* pm = base::PowerMonitor::Get())
pm->AddObserver(this);
@@ -120,6 +118,9 @@ void WatchTimeReporter::OnPowerStateChange(bool on_battery_power) {
bool WatchTimeReporter::ShouldReportWatchTime() {
// Only report watch time for media of sufficient size with both audio and
// video tracks present.
+ // TODO(tguilbert): HLS playback will always have an |initial_video_size_| of
+ // (0,0) and never report watchtime. Fix this as part of HLS UMA cleanup.
+ // See crbug.com/650891.
return has_audio_ && has_video_ &&
initial_video_size_.height() >= kMinimumVideoSize.height() &&
initial_video_size_.width() >= kMinimumVideoSize.width();
« no previous file with comments | « media/base/pipeline_metadata.h ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698