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

Unified Diff: webkit/media/buffered_data_source.cc

Issue 10694098: Use maximum capacity instead of a ratio of capacity for BufferedResourceLoader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments 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
Index: webkit/media/buffered_data_source.cc
diff --git a/webkit/media/buffered_data_source.cc b/webkit/media/buffered_data_source.cc
index 737535026a0a77af9d573b16e19e8fb5184f4977..1b97ac8a8a0f8898d611a32e4f35ac2260cdaf7e 100644
--- a/webkit/media/buffered_data_source.cc
+++ b/webkit/media/buffered_data_source.cc
@@ -72,7 +72,7 @@ BufferedResourceLoader* BufferedDataSource::CreateResourceLoader(
BufferedResourceLoader::DeferStrategy strategy = preload_ == METADATA ?
BufferedResourceLoader::kReadThenDefer :
- BufferedResourceLoader::kThresholdDefer;
+ BufferedResourceLoader::kCapacityDefer;
return new BufferedResourceLoader(url_,
cors_mode_,
@@ -309,18 +309,18 @@ void BufferedDataSource::SetPlaybackRateTask(float playback_rate) {
// 200 responses end up not being reused to satisfy future range requests,
// and we don't want to get too far ahead of the read-head (and thus require
// a restart), so keep to the thresholds.
- loader_->UpdateDeferStrategy(BufferedResourceLoader::kThresholdDefer);
+ loader_->UpdateDeferStrategy(BufferedResourceLoader::kCapacityDefer);
} else if (media_has_played_ && playback_rate == 0) {
// If the playback has started (at which point the preload value is ignored)
// and we're paused, then try to load as much as possible (the loader will
- // fall back to kThresholdDefer if it knows the current response won't be
+ // fall back to kCapacityDefer if it knows the current response won't be
// useful from the cache in the future).
loader_->UpdateDeferStrategy(BufferedResourceLoader::kNeverDefer);
} else {
// If media is currently playing or the page indicated preload=auto,
// use threshold strategy to enable/disable deferring when the buffer
// is full/depleted.
- loader_->UpdateDeferStrategy(BufferedResourceLoader::kThresholdDefer);
+ loader_->UpdateDeferStrategy(BufferedResourceLoader::kCapacityDefer);
}
}
« no previous file with comments | « no previous file | webkit/media/buffered_data_source_unittest.cc » ('j') | webkit/media/buffered_resource_loader.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698