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

Unified Diff: webkit/media/buffered_data_source.cc

Issue 9269027: Revert 118546 because it caused PrerenderHTML5VideoNetwork to timeout on windows and linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 11 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.cc ('k') | webkit/media/buffered_data_source_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/buffered_data_source.cc
===================================================================
--- webkit/media/buffered_data_source.cc (revision 118589)
+++ webkit/media/buffered_data_source.cc (working copy)
@@ -552,10 +552,11 @@
// before. Update the total size so Read()s past the end of the file will
// fail like they would if we had known the file size at the beginning.
total_bytes_ = loader_->instance_size();
- if (total_bytes_ != kPositionNotSpecified)
- buffered_bytes_ = total_bytes_;
- UpdateHostState_Locked();
+ if (host() && total_bytes_ != kPositionNotSpecified) {
+ host()->SetTotalBytes(total_bytes_);
+ host()->SetBufferedBytes(total_bytes_);
+ }
}
DoneRead_Locked(error);
}
@@ -588,10 +589,15 @@
if (stop_signal_received_)
return;
- is_downloading_data_ = is_downloading_data;
+ if (is_downloading_data != is_downloading_data_) {
+ is_downloading_data_ = is_downloading_data;
+ if (host())
+ host()->SetNetworkActivity(is_downloading_data);
+ }
+
buffered_bytes_ = buffered_position + 1;
-
- UpdateHostState_Locked();
+ if (host())
+ host()->SetBufferedBytes(buffered_bytes_);
}
void BufferedDataSource::UpdateHostState_Locked() {
@@ -603,7 +609,6 @@
if (total_bytes_ != kPositionNotSpecified)
host()->SetTotalBytes(total_bytes_);
- host()->SetNetworkActivity(is_downloading_data_);
host()->SetBufferedBytes(buffered_bytes_);
}
« no previous file with comments | « media/base/pipeline.cc ('k') | webkit/media/buffered_data_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698