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

Unified Diff: media/blink/watch_time_reporter.cc

Issue 2387293007: Register MediaPlayerRenderer service (Closed)
Patch Set: 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
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..ec2ea5dd897fe9f2b86b0a724152ac5addce2783 100644
--- a/media/blink/watch_time_reporter.cc
+++ b/media/blink/watch_time_reporter.cc
@@ -38,8 +38,18 @@ 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());
+
+ // TODO(tguilbert): For-reviewers -- Any suggested way to deal with the
+ // watchtime reporter for HLS playback? It runs into this DCHECK due to the
+ // fact that we don't know the size of the video until we start playing. I
+ // tried circumventing this by creating the watchtime reporter later, but ran
+ // into another plethora of DCHECKs instead.
+ //
+ // Considering the fact that we don't report the video anyways if it's smaller
+ // than (200, 200), I am considering just removing the DCHECK I commented
+ // below.
+ // if (has_video_)
+ // DCHECK(!initial_video_size_.IsEmpty());
if (base::PowerMonitor* pm = base::PowerMonitor::Get())
pm->AddObserver(this);

Powered by Google App Engine
This is Rietveld 408576698