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

Unified Diff: media/blink/resource_multibuffer_data_provider.cc

Issue 1941783004: Fix seeking after redirect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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/blink/resource_multibuffer_data_provider.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/resource_multibuffer_data_provider.cc
diff --git a/media/blink/resource_multibuffer_data_provider.cc b/media/blink/resource_multibuffer_data_provider.cc
index 9f31849eb4136203bfe2b42b7ed917840b364e3d..406b63a712e8b101fc452507659a0b64ca14cc49 100644
--- a/media/blink/resource_multibuffer_data_provider.cc
+++ b/media/blink/resource_multibuffer_data_provider.cc
@@ -262,7 +262,8 @@ void ResourceMultiBufferDataProvider::didReceiveResponse(
// If we have verified the partial response and it is correct.
// It's also possible for a server to support range requests
// without advertising "Accept-Ranges: bytes".
- if (partial_response && VerifyPartialResponse(response)) {
+ if (partial_response &&
+ VerifyPartialResponse(response, destination_url_data)) {
destination_url_data->set_range_supported();
} else if (ok_response && pos_ == 0) {
// We accept a 200 response for a Range:0- request, trusting the
@@ -483,7 +484,8 @@ int64_t ResourceMultiBufferDataProvider::block_size() const {
}
bool ResourceMultiBufferDataProvider::VerifyPartialResponse(
- const WebURLResponse& response) {
+ const WebURLResponse& response,
+ const scoped_refptr<UrlData>& url_data) {
int64_t first_byte_position, last_byte_position, instance_size;
if (!ParseContentRange(response.httpHeaderField("Content-Range").utf8(),
&first_byte_position, &last_byte_position,
@@ -492,7 +494,7 @@ bool ResourceMultiBufferDataProvider::VerifyPartialResponse(
}
if (url_data_->length() == kPositionNotSpecified) {
- url_data_->set_length(instance_size);
+ url_data->set_length(instance_size);
}
if (byte_pos() != first_byte_position) {
« no previous file with comments | « media/blink/resource_multibuffer_data_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698