| Index: media/blink/watch_time_reporter.cc
|
| diff --git a/media/blink/watch_time_reporter.cc b/media/blink/watch_time_reporter.cc
|
| index f279e9c238cf3abe07986f225a4fb343b8ef0d90..b0127d749181380c611f089bf94ebca97db623f0 100644
|
| --- a/media/blink/watch_time_reporter.cc
|
| +++ b/media/blink/watch_time_reporter.cc
|
| @@ -162,6 +162,11 @@ void WatchTimeReporter::OnHidden() {
|
| MaybeFinalizeWatchTime(FinalizeTime::ON_NEXT_UPDATE);
|
| }
|
|
|
| +bool WatchTimeReporter::IsSizeLargeEnoughToReportWatchTime() const {
|
| + return initial_video_size_.height() >= kMinimumVideoSize.height() &&
|
| + initial_video_size_.width() >= kMinimumVideoSize.width();
|
| +}
|
| +
|
| void WatchTimeReporter::OnPowerStateChange(bool on_battery_power) {
|
| if (!reporting_timer_.IsRunning())
|
| return;
|
| @@ -184,9 +189,7 @@ bool WatchTimeReporter::ShouldReportWatchTime() {
|
| // Report listen time or watch time only for tracks that are audio-only or
|
| // have both an audio and video track of sufficient size.
|
| return (!has_video_ && has_audio_) ||
|
| - (has_video_ && has_audio_ &&
|
| - initial_video_size_.height() >= kMinimumVideoSize.height() &&
|
| - initial_video_size_.width() >= kMinimumVideoSize.width());
|
| + (has_video_ && has_audio_ && IsSizeLargeEnoughToReportWatchTime());
|
| }
|
|
|
| void WatchTimeReporter::MaybeStartReportingTimer(
|
|
|