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

Unified Diff: webkit/media/buffered_data_source.h

Issue 10698139: Write file:// tests for BufferedDataSource and fix some bugs as a result. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: remove buffered_bytes_ Created 8 years, 5 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 | « no previous file | webkit/media/buffered_data_source.cc » ('j') | webkit/media/buffered_data_source.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/buffered_data_source.h
diff --git a/webkit/media/buffered_data_source.h b/webkit/media/buffered_data_source.h
index 61f5e3f09ac3ae327cf44fcee1c2b49d156402cc..31d4ed579e850488fa8118dc6c8fa3fc71730413 100644
--- a/webkit/media/buffered_data_source.h
+++ b/webkit/media/buffered_data_source.h
@@ -154,12 +154,14 @@ class BufferedDataSource : public media::DataSource {
// crossorigin attribute on the corresponding HTML media element, if any.
BufferedResourceLoader::CORSMode cors_mode_;
- // Members for total bytes of the requested object. It is written once on
- // render thread but may be read from any thread. However reading of this
- // member is guaranteed to happen after it is first written, so we don't
- // need to protect it.
+ // The total size of the resource. Set during StartCallback() if the size is
+ // known, otherwise it will remain kPositionNotSpecified until the size is
+ // determined by reaching EOF.
int64 total_bytes_;
- int64 buffered_bytes_;
+
+ // Some resources are assumed to be fully buffered (i.e., file://) so we don't
+ // need to report the what |loader_| has buffered.
+ bool assume_fully_buffered_;
// This value will be true if this data source can only support streaming.
// i.e. range request is not supported.
« no previous file with comments | « no previous file | webkit/media/buffered_data_source.cc » ('j') | webkit/media/buffered_data_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698