Commit 7b5ce7d6 authored by hclam@chromium.org's avatar hclam@chromium.org

Remove branch in WebMediaPlayerImpl that is never reached

Since bytes loaded never equal to total bytes if the resource is from http
the branch is never reached and lead to confusion about the logic.

This was discovered while working on other platforms.

BUG=None
TEST=None

Review URL: http://codereview.chromium.org/7646016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97133 0039d316-1c4b-4281-b951-d872f2087c98
parent 9824015a
...@@ -747,20 +747,10 @@ void WebMediaPlayerImpl::OnPipelineError(PipelineStatus error) { ...@@ -747,20 +747,10 @@ void WebMediaPlayerImpl::OnPipelineError(PipelineStatus error) {
void WebMediaPlayerImpl::OnNetworkEvent(PipelineStatus status) { void WebMediaPlayerImpl::OnNetworkEvent(PipelineStatus status) {
DCHECK(MessageLoop::current() == main_loop_); DCHECK(MessageLoop::current() == main_loop_);
if (status == media::PIPELINE_OK) { if (status == media::PIPELINE_OK) {
if (pipeline_->IsNetworkActive()) { if (pipeline_->IsNetworkActive())
SetNetworkState(WebKit::WebMediaPlayer::Loading); SetNetworkState(WebKit::WebMediaPlayer::Loading);
} else { else
// If we are inactive because we just finished receiving all the data,
// do one final repaint to show final progress.
if (bytesLoaded() == totalBytes() &&
network_state_ != WebKit::WebMediaPlayer::Idle) {
Repaint();
SetNetworkState(WebKit::WebMediaPlayer::Loaded);
}
SetNetworkState(WebKit::WebMediaPlayer::Idle); SetNetworkState(WebKit::WebMediaPlayer::Idle);
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment