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

Unified Diff: webkit/media/buffered_data_source.cc

Issue 8661002: Fire CanPlayThrough immediately for local and streaming media files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase ToT Created 9 years, 1 month 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: webkit/media/buffered_data_source.cc
diff --git a/webkit/media/buffered_data_source.cc b/webkit/media/buffered_data_source.cc
index 2d7b8c9cfde9a7ce3d475a6a8b0500a6a32ea88b..22932373fc44364668adfd5a804c0c4be942dae1 100644
--- a/webkit/media/buffered_data_source.cc
+++ b/webkit/media/buffered_data_source.cc
@@ -45,7 +45,6 @@ BufferedDataSource::BufferedDataSource(
media::MediaLog* media_log)
: total_bytes_(kPositionNotSpecified),
buffered_bytes_(0),
- loaded_(false),
streaming_(false),
frame_(frame),
loader_(NULL),
@@ -431,7 +430,6 @@ void BufferedDataSource::HttpInitialStartCallback(int error) {
// TODO(hclam): Needs more thinking about supporting servers without range
// request or their partial response is not complete.
total_bytes_ = instance_size;
- loaded_ = false;
streaming_ = (instance_size == kPositionNotSpecified) ||
!loader_->range_supported();
} else {
@@ -501,7 +499,6 @@ void BufferedDataSource::NonHttpInitialStartCallback(int error) {
if (success) {
total_bytes_ = instance_size;
buffered_bytes_ = total_bytes_;
- loaded_ = true;
} else {
loader_->Stop();
}
@@ -616,7 +613,7 @@ void BufferedDataSource::NetworkEventCallback() {
// In case of non-HTTP request we don't need to report network events,
// so return immediately.
- if (loaded_)
+ if (!url_.SchemeIs(kHttpScheme) && !url_.SchemeIs(kHttpsScheme))
return;
bool is_downloading_data = loader_->is_downloading_data();
@@ -657,11 +654,6 @@ void BufferedDataSource::UpdateHostState_Locked() {
if (!filter_host)
return;
- filter_host->SetLoaded(loaded_);
-
- if (streaming_)
- filter_host->SetStreaming(true);
-
if (total_bytes_ != kPositionNotSpecified)
filter_host->SetTotalBytes(total_bytes_);
filter_host->SetBufferedBytes(buffered_bytes_);

Powered by Google App Engine
This is Rietveld 408576698