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

Unified Diff: webkit/media/buffered_resource_loader.h

Issue 10387200: Suppress pause-and-buffer behavior when the HTTP response won't satisfy future requests via cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: %zu is win-unfriendly; use %PRIuS instead. Created 8 years, 7 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 | « webkit/media/buffered_data_source.cc ('k') | webkit/media/buffered_resource_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/buffered_resource_loader.h
diff --git a/webkit/media/buffered_resource_loader.h b/webkit/media/buffered_resource_loader.h
index bcf0979bc263e211192d275927ecfede7b5487f1..32779413e6710890b417e3cf5534b54947ceb09d 100644
--- a/webkit/media/buffered_resource_loader.h
+++ b/webkit/media/buffered_resource_loader.h
@@ -169,7 +169,10 @@ class BufferedResourceLoader : public WebKit::WebURLLoaderClient {
// Only valid to call after Start() has completed.
bool HasSingleOrigin() const;
- // Sets the defer strategy to the given value.
+ // Sets the defer strategy to the given value unless it seems unwise.
+ // Specifically downgrade kNeverDefer to kThresholdDefer if we know the
+ // current response will not be used to satisfy future requests (the cache
+ // won't help us).
void UpdateDeferStrategy(DeferStrategy strategy);
// Sets the playback rate to the given value and updates buffer window
@@ -267,6 +270,10 @@ class BufferedResourceLoader : public WebKit::WebURLLoaderClient {
// Current buffering algorithm in place for resource loading.
DeferStrategy defer_strategy_;
+ // True if the currently-reading response might be used to satisfy a future
+ // request from the cache.
+ bool might_be_reused_from_cache_in_future_;
+
// True if Range header is supported.
bool range_supported_;
« no previous file with comments | « webkit/media/buffered_data_source.cc ('k') | webkit/media/buffered_resource_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698