OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/child/web_url_loader_impl.h" | 5 #include "content/child/web_url_loader_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "components/mime_util/mime_util.h" | 18 #include "components/mime_util/mime_util.h" |
19 #include "components/scheduler/child/web_task_runner_impl.h" | |
20 #include "content/child/child_thread_impl.h" | 19 #include "content/child/child_thread_impl.h" |
21 #include "content/child/ftp_directory_listing_response_delegate.h" | 20 #include "content/child/ftp_directory_listing_response_delegate.h" |
22 #include "content/child/multipart_response_delegate.h" | 21 #include "content/child/multipart_response_delegate.h" |
23 #include "content/child/request_extra_data.h" | 22 #include "content/child/request_extra_data.h" |
24 #include "content/child/request_info.h" | 23 #include "content/child/request_info.h" |
25 #include "content/child/resource_dispatcher.h" | 24 #include "content/child/resource_dispatcher.h" |
26 #include "content/child/shared_memory_data_consumer_handle.h" | 25 #include "content/child/shared_memory_data_consumer_handle.h" |
27 #include "content/child/sync_load_response.h" | 26 #include "content/child/sync_load_response.h" |
28 #include "content/child/web_url_request_util.h" | 27 #include "content/child/web_url_request_util.h" |
29 #include "content/child/weburlresponse_extradata_impl.h" | 28 #include "content/child/weburlresponse_extradata_impl.h" |
30 #include "content/common/resource_messages.h" | 29 #include "content/common/resource_messages.h" |
31 #include "content/common/resource_request_body.h" | 30 #include "content/common/resource_request_body.h" |
32 #include "content/common/service_worker/service_worker_types.h" | 31 #include "content/common/service_worker/service_worker_types.h" |
33 #include "content/common/ssl_status_serialization.h" | 32 #include "content/common/ssl_status_serialization.h" |
34 #include "content/public/child/fixed_received_data.h" | 33 #include "content/public/child/fixed_received_data.h" |
35 #include "content/public/child/request_peer.h" | 34 #include "content/public/child/request_peer.h" |
36 #include "content/public/common/content_switches.h" | 35 #include "content/public/common/content_switches.h" |
37 #include "net/base/data_url.h" | 36 #include "net/base/data_url.h" |
38 #include "net/base/filename_util.h" | 37 #include "net/base/filename_util.h" |
39 #include "net/base/net_errors.h" | 38 #include "net/base/net_errors.h" |
40 #include "net/http/http_response_headers.h" | 39 #include "net/http/http_response_headers.h" |
41 #include "net/http/http_util.h" | 40 #include "net/http/http_util.h" |
42 #include "net/ssl/ssl_cipher_suite_names.h" | 41 #include "net/ssl/ssl_cipher_suite_names.h" |
43 #include "net/ssl/ssl_connection_status_flags.h" | 42 #include "net/ssl/ssl_connection_status_flags.h" |
44 #include "net/url_request/url_request_data_job.h" | 43 #include "net/url_request/url_request_data_job.h" |
45 #include "third_party/WebKit/public/platform/WebHTTPLoadInfo.h" | 44 #include "third_party/WebKit/public/platform/WebHTTPLoadInfo.h" |
46 #include "third_party/WebKit/public/platform/WebTraceLocation.h" | |
47 #include "third_party/WebKit/public/platform/WebURL.h" | 45 #include "third_party/WebKit/public/platform/WebURL.h" |
48 #include "third_party/WebKit/public/platform/WebURLError.h" | 46 #include "third_party/WebKit/public/platform/WebURLError.h" |
49 #include "third_party/WebKit/public/platform/WebURLLoadTiming.h" | 47 #include "third_party/WebKit/public/platform/WebURLLoadTiming.h" |
50 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" | 48 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" |
51 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 49 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
52 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 50 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
53 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" | 51 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
54 | 52 |
55 using base::Time; | 53 using base::Time; |
56 using base::TimeTicks; | 54 using base::TimeTicks; |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 // WebURLLoaderImpl::Context -------------------------------------------------- | 247 // WebURLLoaderImpl::Context -------------------------------------------------- |
250 | 248 |
251 // This inner class exists since the WebURLLoader may be deleted while inside a | 249 // This inner class exists since the WebURLLoader may be deleted while inside a |
252 // call to WebURLLoaderClient. Refcounting is to keep the context from being | 250 // call to WebURLLoaderClient. Refcounting is to keep the context from being |
253 // deleted if it may have work to do after calling into the client. | 251 // deleted if it may have work to do after calling into the client. |
254 class WebURLLoaderImpl::Context : public base::RefCounted<Context>, | 252 class WebURLLoaderImpl::Context : public base::RefCounted<Context>, |
255 public RequestPeer { | 253 public RequestPeer { |
256 public: | 254 public: |
257 Context(WebURLLoaderImpl* loader, | 255 Context(WebURLLoaderImpl* loader, |
258 ResourceDispatcher* resource_dispatcher, | 256 ResourceDispatcher* resource_dispatcher, |
259 scoped_ptr<blink::WebTaskRunner> task_runner); | 257 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
260 | 258 |
261 WebURLLoaderClient* client() const { return client_; } | 259 WebURLLoaderClient* client() const { return client_; } |
262 void set_client(WebURLLoaderClient* client) { client_ = client; } | 260 void set_client(WebURLLoaderClient* client) { client_ = client; } |
263 | 261 |
264 void Cancel(); | 262 void Cancel(); |
265 void SetDefersLoading(bool value); | 263 void SetDefersLoading(bool value); |
266 void DidChangePriority(WebURLRequest::Priority new_priority, | 264 void DidChangePriority(WebURLRequest::Priority new_priority, |
267 int intra_priority_value); | 265 int intra_priority_value); |
268 bool AttachThreadedDataReceiver( | 266 bool AttachThreadedDataReceiver( |
269 blink::WebThreadedDataReceiver* threaded_data_receiver); | 267 blink::WebThreadedDataReceiver* threaded_data_receiver); |
270 void Start(const WebURLRequest& request, | 268 void Start(const WebURLRequest& request, |
271 SyncLoadResponse* sync_load_response); | 269 SyncLoadResponse* sync_load_response); |
272 void SetWebTaskRunner(scoped_ptr<blink::WebTaskRunner> task_runner); | |
273 | 270 |
274 // RequestPeer methods: | 271 // RequestPeer methods: |
275 void OnUploadProgress(uint64 position, uint64 size) override; | 272 void OnUploadProgress(uint64 position, uint64 size) override; |
276 bool OnReceivedRedirect(const net::RedirectInfo& redirect_info, | 273 bool OnReceivedRedirect(const net::RedirectInfo& redirect_info, |
277 const ResourceResponseInfo& info) override; | 274 const ResourceResponseInfo& info) override; |
278 void OnReceivedResponse(const ResourceResponseInfo& info) override; | 275 void OnReceivedResponse(const ResourceResponseInfo& info) override; |
279 void OnDownloadedData(int len, int encoded_data_length) override; | 276 void OnDownloadedData(int len, int encoded_data_length) override; |
280 void OnReceivedData(scoped_ptr<ReceivedData> data) override; | 277 void OnReceivedData(scoped_ptr<ReceivedData> data) override; |
281 void OnReceivedCachedMetadata(const char* data, int len) override; | 278 void OnReceivedCachedMetadata(const char* data, int len) override; |
282 void OnCompletedRequest(int error_code, | 279 void OnCompletedRequest(int error_code, |
283 bool was_ignored_by_handler, | 280 bool was_ignored_by_handler, |
284 bool stale_copy_in_cache, | 281 bool stale_copy_in_cache, |
285 const std::string& security_info, | 282 const std::string& security_info, |
286 const base::TimeTicks& completion_time, | 283 const base::TimeTicks& completion_time, |
287 int64 total_transfer_size) override; | 284 int64 total_transfer_size) override; |
288 void OnReceivedCompletedResponse(const ResourceResponseInfo& info, | 285 void OnReceivedCompletedResponse(const ResourceResponseInfo& info, |
289 scoped_ptr<ReceivedData> data, | 286 scoped_ptr<ReceivedData> data, |
290 int error_code, | 287 int error_code, |
291 bool was_ignored_by_handler, | 288 bool was_ignored_by_handler, |
292 bool stale_copy_in_cache, | 289 bool stale_copy_in_cache, |
293 const std::string& security_info, | 290 const std::string& security_info, |
294 const base::TimeTicks& completion_time, | 291 const base::TimeTicks& completion_time, |
295 int64 total_transfer_size) override; | 292 int64 total_transfer_size) override; |
296 | 293 |
297 private: | 294 private: |
298 friend class base::RefCounted<Context>; | 295 friend class base::RefCounted<Context>; |
299 ~Context() override; | 296 ~Context() override; |
300 | 297 |
301 class HandleDataURLTask : public blink::WebTaskRunner::Task { | |
302 public: | |
303 explicit HandleDataURLTask(scoped_refptr<Context> context) | |
304 : context_(context) {} | |
305 | |
306 void run() override { | |
307 context_->HandleDataURL(); | |
308 } | |
309 | |
310 private: | |
311 scoped_refptr<Context> context_; | |
312 }; | |
313 | |
314 // Called when the body data stream is detached from the reader side. | 298 // Called when the body data stream is detached from the reader side. |
315 void CancelBodyStreaming(); | 299 void CancelBodyStreaming(); |
316 // We can optimize the handling of data URLs in most cases. | 300 // We can optimize the handling of data URLs in most cases. |
317 bool CanHandleDataURLRequestLocally() const; | 301 bool CanHandleDataURLRequestLocally() const; |
318 void HandleDataURL(); | 302 void HandleDataURL(); |
319 | 303 |
320 WebURLLoaderImpl* loader_; | 304 WebURLLoaderImpl* loader_; |
321 WebURLRequest request_; | 305 WebURLRequest request_; |
322 WebURLLoaderClient* client_; | 306 WebURLLoaderClient* client_; |
323 ResourceDispatcher* resource_dispatcher_; | 307 ResourceDispatcher* resource_dispatcher_; |
324 scoped_ptr<blink::WebTaskRunner> web_task_runner_; | 308 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
325 WebReferrerPolicy referrer_policy_; | 309 WebReferrerPolicy referrer_policy_; |
326 scoped_ptr<FtpDirectoryListingResponseDelegate> ftp_listing_delegate_; | 310 scoped_ptr<FtpDirectoryListingResponseDelegate> ftp_listing_delegate_; |
327 scoped_ptr<MultipartResponseDelegate> multipart_delegate_; | 311 scoped_ptr<MultipartResponseDelegate> multipart_delegate_; |
328 scoped_ptr<StreamOverrideParameters> stream_override_; | 312 scoped_ptr<StreamOverrideParameters> stream_override_; |
329 scoped_ptr<SharedMemoryDataConsumerHandle::Writer> body_stream_writer_; | 313 scoped_ptr<SharedMemoryDataConsumerHandle::Writer> body_stream_writer_; |
330 enum DeferState {NOT_DEFERRING, SHOULD_DEFER, DEFERRED_DATA}; | 314 enum DeferState {NOT_DEFERRING, SHOULD_DEFER, DEFERRED_DATA}; |
331 DeferState defers_loading_; | 315 DeferState defers_loading_; |
332 int request_id_; | 316 int request_id_; |
333 }; | 317 }; |
334 | 318 |
335 WebURLLoaderImpl::Context::Context( | 319 WebURLLoaderImpl::Context::Context( |
336 WebURLLoaderImpl* loader, | 320 WebURLLoaderImpl* loader, |
337 ResourceDispatcher* resource_dispatcher, | 321 ResourceDispatcher* resource_dispatcher, |
338 scoped_ptr<blink::WebTaskRunner> web_task_runner) | 322 scoped_refptr<base::SingleThreadTaskRunner> task_runner) |
339 : loader_(loader), | 323 : loader_(loader), |
340 client_(NULL), | 324 client_(NULL), |
341 resource_dispatcher_(resource_dispatcher), | 325 resource_dispatcher_(resource_dispatcher), |
342 web_task_runner_(web_task_runner.Pass()), | 326 task_runner_(task_runner), |
343 referrer_policy_(blink::WebReferrerPolicyDefault), | 327 referrer_policy_(blink::WebReferrerPolicyDefault), |
344 defers_loading_(NOT_DEFERRING), | 328 defers_loading_(NOT_DEFERRING), |
345 request_id_(-1) { | 329 request_id_(-1) { |
346 } | 330 } |
347 | 331 |
348 void WebURLLoaderImpl::Context::Cancel() { | 332 void WebURLLoaderImpl::Context::Cancel() { |
349 if (resource_dispatcher_ && // NULL in unittest. | 333 if (resource_dispatcher_ && // NULL in unittest. |
350 request_id_ != -1) { | 334 request_id_ != -1) { |
351 resource_dispatcher_->Cancel(request_id_); | 335 resource_dispatcher_->Cancel(request_id_); |
352 request_id_ = -1; | 336 request_id_ = -1; |
(...skipping 15 matching lines...) Expand all Loading... |
368 loader_ = NULL; | 352 loader_ = NULL; |
369 } | 353 } |
370 | 354 |
371 void WebURLLoaderImpl::Context::SetDefersLoading(bool value) { | 355 void WebURLLoaderImpl::Context::SetDefersLoading(bool value) { |
372 if (request_id_ != -1) | 356 if (request_id_ != -1) |
373 resource_dispatcher_->SetDefersLoading(request_id_, value); | 357 resource_dispatcher_->SetDefersLoading(request_id_, value); |
374 if (value && defers_loading_ == NOT_DEFERRING) { | 358 if (value && defers_loading_ == NOT_DEFERRING) { |
375 defers_loading_ = SHOULD_DEFER; | 359 defers_loading_ = SHOULD_DEFER; |
376 } else if (!value && defers_loading_ != NOT_DEFERRING) { | 360 } else if (!value && defers_loading_ != NOT_DEFERRING) { |
377 if (defers_loading_ == DEFERRED_DATA) { | 361 if (defers_loading_ == DEFERRED_DATA) { |
378 // TODO(alexclarke): Find a way to let blink and chromium FROM_HERE | 362 task_runner_->PostTask(FROM_HERE, |
379 // coexist. | 363 base::Bind(&Context::HandleDataURL, this)); |
380 web_task_runner_->postTask( | |
381 ::blink::WebTraceLocation(__FUNCTION__, __FILE__), | |
382 new HandleDataURLTask(this)); | |
383 } | 364 } |
384 defers_loading_ = NOT_DEFERRING; | 365 defers_loading_ = NOT_DEFERRING; |
385 } | 366 } |
386 } | 367 } |
387 | 368 |
388 void WebURLLoaderImpl::Context::DidChangePriority( | 369 void WebURLLoaderImpl::Context::DidChangePriority( |
389 WebURLRequest::Priority new_priority, int intra_priority_value) { | 370 WebURLRequest::Priority new_priority, int intra_priority_value) { |
390 if (request_id_ != -1) { | 371 if (request_id_ != -1) { |
391 resource_dispatcher_->DidChangePriority( | 372 resource_dispatcher_->DidChangePriority( |
392 request_id_, | 373 request_id_, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 } | 411 } |
431 | 412 |
432 if (CanHandleDataURLRequestLocally()) { | 413 if (CanHandleDataURLRequestLocally()) { |
433 if (sync_load_response) { | 414 if (sync_load_response) { |
434 // This is a sync load. Do the work now. | 415 // This is a sync load. Do the work now. |
435 sync_load_response->url = url; | 416 sync_load_response->url = url; |
436 sync_load_response->error_code = | 417 sync_load_response->error_code = |
437 GetInfoFromDataURL(sync_load_response->url, sync_load_response, | 418 GetInfoFromDataURL(sync_load_response->url, sync_load_response, |
438 &sync_load_response->data); | 419 &sync_load_response->data); |
439 } else { | 420 } else { |
440 // TODO(alexclarke): Find a way to let blink and chromium FROM_HERE | 421 task_runner_->PostTask(FROM_HERE, |
441 // coexist. | 422 base::Bind(&Context::HandleDataURL, this)); |
442 web_task_runner_->postTask( | |
443 ::blink::WebTraceLocation(__FUNCTION__, __FILE__), | |
444 new HandleDataURLTask(this)); | |
445 } | 423 } |
446 return; | 424 return; |
447 } | 425 } |
448 | 426 |
449 // PlzNavigate: outside of tests, the only navigation requests going through | 427 // PlzNavigate: outside of tests, the only navigation requests going through |
450 // the WebURLLoader are the ones created by CommitNavigation. Several browser | 428 // the WebURLLoader are the ones created by CommitNavigation. Several browser |
451 // tests load HTML directly through a data url which will be handled by the | 429 // tests load HTML directly through a data url which will be handled by the |
452 // block above. | 430 // block above. |
453 DCHECK_IMPLIES(base::CommandLine::ForCurrentProcess()->HasSwitch( | 431 DCHECK_IMPLIES(base::CommandLine::ForCurrentProcess()->HasSwitch( |
454 switches::kEnableBrowserSideNavigation), | 432 switches::kEnableBrowserSideNavigation), |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 request_info.fetch_credentials_mode = | 475 request_info.fetch_credentials_mode = |
498 GetFetchCredentialsModeForWebURLRequest(request); | 476 GetFetchCredentialsModeForWebURLRequest(request); |
499 request_info.fetch_redirect_mode = | 477 request_info.fetch_redirect_mode = |
500 GetFetchRedirectModeForWebURLRequest(request); | 478 GetFetchRedirectModeForWebURLRequest(request); |
501 request_info.fetch_request_context_type = | 479 request_info.fetch_request_context_type = |
502 GetRequestContextTypeForWebURLRequest(request); | 480 GetRequestContextTypeForWebURLRequest(request); |
503 request_info.fetch_frame_type = | 481 request_info.fetch_frame_type = |
504 GetRequestContextFrameTypeForWebURLRequest(request); | 482 GetRequestContextFrameTypeForWebURLRequest(request); |
505 request_info.extra_data = request.extraData(); | 483 request_info.extra_data = request.extraData(); |
506 request_info.report_raw_headers = request.reportRawHeaders(); | 484 request_info.report_raw_headers = request.reportRawHeaders(); |
507 request_info.loading_web_task_runner.reset(web_task_runner_->clone()); | |
508 | 485 |
509 scoped_refptr<ResourceRequestBody> request_body = | 486 scoped_refptr<ResourceRequestBody> request_body = |
510 GetRequestBodyForWebURLRequest(request).get(); | 487 GetRequestBodyForWebURLRequest(request).get(); |
511 | 488 |
512 if (sync_load_response) { | 489 if (sync_load_response) { |
513 resource_dispatcher_->StartSync( | 490 resource_dispatcher_->StartSync( |
514 request_info, request_body.get(), sync_load_response); | 491 request_info, request_body.get(), sync_load_response); |
515 return; | 492 return; |
516 } | 493 } |
517 | 494 |
518 request_id_ = resource_dispatcher_->StartAsync( | 495 request_id_ = resource_dispatcher_->StartAsync( |
519 request_info, request_body.get(), this); | 496 request_info, request_body.get(), this); |
520 } | 497 } |
521 | 498 |
522 void WebURLLoaderImpl::Context::SetWebTaskRunner( | |
523 scoped_ptr<blink::WebTaskRunner> web_task_runner) { | |
524 web_task_runner_ = web_task_runner.Pass(); | |
525 } | |
526 | |
527 void WebURLLoaderImpl::Context::OnUploadProgress(uint64 position, uint64 size) { | 499 void WebURLLoaderImpl::Context::OnUploadProgress(uint64 position, uint64 size) { |
528 if (client_) | 500 if (client_) |
529 client_->didSendData(loader_, position, size); | 501 client_->didSendData(loader_, position, size); |
530 } | 502 } |
531 | 503 |
532 bool WebURLLoaderImpl::Context::OnReceivedRedirect( | 504 bool WebURLLoaderImpl::Context::OnReceivedRedirect( |
533 const net::RedirectInfo& redirect_info, | 505 const net::RedirectInfo& redirect_info, |
534 const ResourceResponseInfo& info) { | 506 const ResourceResponseInfo& info) { |
535 if (!client_) | 507 if (!client_) |
536 return false; | 508 return false; |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 } | 834 } |
863 | 835 |
864 OnCompletedRequest(error_code, false, false, info.security_info, | 836 OnCompletedRequest(error_code, false, false, info.security_info, |
865 base::TimeTicks::Now(), 0); | 837 base::TimeTicks::Now(), 0); |
866 } | 838 } |
867 | 839 |
868 // WebURLLoaderImpl ----------------------------------------------------------- | 840 // WebURLLoaderImpl ----------------------------------------------------------- |
869 | 841 |
870 WebURLLoaderImpl::WebURLLoaderImpl( | 842 WebURLLoaderImpl::WebURLLoaderImpl( |
871 ResourceDispatcher* resource_dispatcher, | 843 ResourceDispatcher* resource_dispatcher, |
872 scoped_ptr<blink::WebTaskRunner> web_task_runner) | 844 scoped_refptr<base::SingleThreadTaskRunner> task_runner) |
873 : context_(new Context(this, resource_dispatcher, web_task_runner.Pass())) { | 845 : context_(new Context(this, resource_dispatcher, task_runner)) { |
874 } | 846 } |
875 | 847 |
876 WebURLLoaderImpl::~WebURLLoaderImpl() { | 848 WebURLLoaderImpl::~WebURLLoaderImpl() { |
877 cancel(); | 849 cancel(); |
878 } | 850 } |
879 | 851 |
880 void WebURLLoaderImpl::PopulateURLResponse(const GURL& url, | 852 void WebURLLoaderImpl::PopulateURLResponse(const GURL& url, |
881 const ResourceResponseInfo& info, | 853 const ResourceResponseInfo& info, |
882 WebURLResponse* response, | 854 WebURLResponse* response, |
883 bool report_security_info) { | 855 bool report_security_info) { |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority, | 1052 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority, |
1081 int intra_priority_value) { | 1053 int intra_priority_value) { |
1082 context_->DidChangePriority(new_priority, intra_priority_value); | 1054 context_->DidChangePriority(new_priority, intra_priority_value); |
1083 } | 1055 } |
1084 | 1056 |
1085 bool WebURLLoaderImpl::attachThreadedDataReceiver( | 1057 bool WebURLLoaderImpl::attachThreadedDataReceiver( |
1086 blink::WebThreadedDataReceiver* threaded_data_receiver) { | 1058 blink::WebThreadedDataReceiver* threaded_data_receiver) { |
1087 return context_->AttachThreadedDataReceiver(threaded_data_receiver); | 1059 return context_->AttachThreadedDataReceiver(threaded_data_receiver); |
1088 } | 1060 } |
1089 | 1061 |
1090 void WebURLLoaderImpl::setLoadingTaskRunner( | |
1091 blink::WebTaskRunner* loading_task_runner) { | |
1092 // There's no guarantee on the lifetime of |loading_task_runner| so we take a | |
1093 // copy. | |
1094 context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone())); | |
1095 } | |
1096 | |
1097 } // namespace content | 1062 } // namespace content |
OLD | NEW |