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 4e6993eb32e9192ae6388882aaf49db7a96e2b1f..ba9d386f280ff87011c8acabeb81164fc78b7f97 100644 |
--- a/media/blink/resource_multibuffer_data_provider.cc |
+++ b/media/blink/resource_multibuffer_data_provider.cc |
@@ -24,12 +24,13 @@ |
#include "net/http/http_request_headers.h" |
#include "third_party/WebKit/public/platform/WebURLError.h" |
#include "third_party/WebKit/public/platform/WebURLResponse.h" |
+#include "third_party/WebKit/public/web/WebAssociatedURLLoader.h" |
+using blink::WebAssociatedURLLoader; |
+using blink::WebAssociatedURLLoaderOptions; |
using blink::WebFrame; |
using blink::WebString; |
using blink::WebURLError; |
-using blink::WebURLLoader; |
-using blink::WebURLLoaderOptions; |
using blink::WebURLRequest; |
using blink::WebURLResponse; |
@@ -96,22 +97,22 @@ void ResourceMultiBufferDataProvider::Start() { |
WebString::fromUTF8(net::HttpRequestHeaders::kAcceptEncoding), |
WebString::fromUTF8("identity;q=1, *;q=0")); |
- // Check for our test WebURLLoader. |
- std::unique_ptr<WebURLLoader> loader; |
+ // Check for our test WebAssociatedURLLoader. |
+ std::unique_ptr<WebAssociatedURLLoader> loader; |
if (test_loader_) { |
loader = std::move(test_loader_); |
} else { |
- WebURLLoaderOptions options; |
+ WebAssociatedURLLoaderOptions options; |
if (url_data_->cors_mode() == UrlData::CORS_UNSPECIFIED) { |
options.allowCredentials = true; |
options.crossOriginRequestPolicy = |
- WebURLLoaderOptions::CrossOriginRequestPolicyAllow; |
+ WebAssociatedURLLoaderOptions::CrossOriginRequestPolicyAllow; |
} else { |
options.exposeAllResponseHeaders = true; |
// The author header set is empty, no preflight should go ahead. |
- options.preflightPolicy = WebURLLoaderOptions::PreventPreflight; |
- options.crossOriginRequestPolicy = |
- WebURLLoaderOptions::CrossOriginRequestPolicyUseAccessControl; |
+ options.preflightPolicy = WebAssociatedURLLoaderOptions::PreventPreflight; |
+ options.crossOriginRequestPolicy = WebAssociatedURLLoaderOptions:: |
+ CrossOriginRequestPolicyUseAccessControl; |
if (url_data_->cors_mode() == UrlData::CORS_USE_CREDENTIALS) |
options.allowCredentials = true; |
} |
@@ -166,11 +167,10 @@ void ResourceMultiBufferDataProvider::SetDeferred(bool deferred) { |
} |
///////////////////////////////////////////////////////////////////////////// |
-// WebURLLoaderClient implementation. |
+// WebAssociatedURLLoaderClient implementation. |
bool ResourceMultiBufferDataProvider::willFollowRedirect( |
- WebURLLoader* loader, |
- WebURLRequest& newRequest, |
+ const WebURLRequest& newRequest, |
const WebURLResponse& redirectResponse) { |
redirects_to_ = newRequest.url(); |
url_data_->set_valid_until(base::Time::Now() + |
@@ -194,14 +194,12 @@ bool ResourceMultiBufferDataProvider::willFollowRedirect( |
} |
void ResourceMultiBufferDataProvider::didSendData( |
- WebURLLoader* loader, |
unsigned long long bytes_sent, |
unsigned long long total_bytes_to_be_sent) { |
NOTIMPLEMENTED(); |
} |
void ResourceMultiBufferDataProvider::didReceiveResponse( |
- WebURLLoader* loader, |
const WebURLResponse& response) { |
#if ENABLE_DLOG |
string version; |
@@ -358,11 +356,8 @@ void ResourceMultiBufferDataProvider::didReceiveResponse( |
} |
} |
-void ResourceMultiBufferDataProvider::didReceiveData(WebURLLoader* loader, |
- const char* data, |
- int data_length, |
- int encoded_data_length, |
- int encoded_body_length) { |
+void ResourceMultiBufferDataProvider::didReceiveData(const char* data, |
+ int data_length) { |
DVLOG(1) << "didReceiveData: " << data_length << " bytes"; |
DCHECK(!Available()); |
DCHECK(active_loader_); |
@@ -390,23 +385,17 @@ void ResourceMultiBufferDataProvider::didReceiveData(WebURLLoader* loader, |
// Beware, this object might be deleted here. |
} |
-void ResourceMultiBufferDataProvider::didDownloadData(WebURLLoader* loader, |
- int dataLength, |
- int encoded_data_length) { |
+void ResourceMultiBufferDataProvider::didDownloadData(int dataLength) { |
NOTIMPLEMENTED(); |
} |
void ResourceMultiBufferDataProvider::didReceiveCachedMetadata( |
- WebURLLoader* loader, |
const char* data, |
int data_length) { |
NOTIMPLEMENTED(); |
} |
-void ResourceMultiBufferDataProvider::didFinishLoading( |
- WebURLLoader* loader, |
- double finishTime, |
- int64_t total_encoded_data_length) { |
+void ResourceMultiBufferDataProvider::didFinishLoading(double finishTime) { |
DVLOG(1) << "didFinishLoading"; |
DCHECK(active_loader_.get()); |
DCHECK(!Available()); |
@@ -445,8 +434,7 @@ void ResourceMultiBufferDataProvider::didFinishLoading( |
// Beware, this object might be deleted here. |
} |
-void ResourceMultiBufferDataProvider::didFail(WebURLLoader* loader, |
- const WebURLError& error) { |
+void ResourceMultiBufferDataProvider::didFail(const WebURLError& error) { |
DVLOG(1) << "didFail: reason=" << error.reason |
<< ", isCancellation=" << error.isCancellation |
<< ", domain=" << error.domain.utf8().data() |