| 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 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. | 5 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. |
| 6 | 6 |
| 7 #include "content/child/web_url_loader_impl.h" | 7 #include "content/child/web_url_loader_impl.h" |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 // the render process, so we can use requestorProcessID even for requests | 387 // the render process, so we can use requestorProcessID even for requests |
| 388 // from in-process plugins. | 388 // from in-process plugins. |
| 389 request_info.requestor_pid = request.requestorProcessID(); | 389 request_info.requestor_pid = request.requestorProcessID(); |
| 390 request_info.request_type = WebURLRequestToResourceType(request); | 390 request_info.request_type = WebURLRequestToResourceType(request); |
| 391 request_info.priority = | 391 request_info.priority = |
| 392 ConvertWebKitPriorityToNetPriority(request.priority()); | 392 ConvertWebKitPriorityToNetPriority(request.priority()); |
| 393 request_info.appcache_host_id = request.appCacheHostID(); | 393 request_info.appcache_host_id = request.appCacheHostID(); |
| 394 request_info.routing_id = request.requestorID(); | 394 request_info.routing_id = request.requestorID(); |
| 395 request_info.download_to_file = request.downloadToFile(); | 395 request_info.download_to_file = request.downloadToFile(); |
| 396 request_info.has_user_gesture = request.hasUserGesture(); | 396 request_info.has_user_gesture = request.hasUserGesture(); |
| 397 request_info.skip_service_worker = request.skipServiceWorker(); |
| 397 request_info.extra_data = request.extraData(); | 398 request_info.extra_data = request.extraData(); |
| 398 referrer_policy_ = request.referrerPolicy(); | 399 referrer_policy_ = request.referrerPolicy(); |
| 399 request_info.referrer_policy = request.referrerPolicy(); | 400 request_info.referrer_policy = request.referrerPolicy(); |
| 400 bridge_.reset(resource_dispatcher_->CreateBridge(request_info)); | 401 bridge_.reset(resource_dispatcher_->CreateBridge(request_info)); |
| 401 | 402 |
| 402 if (!request.httpBody().isNull()) { | 403 if (!request.httpBody().isNull()) { |
| 403 // GET and HEAD requests shouldn't have http bodies. | 404 // GET and HEAD requests shouldn't have http bodies. |
| 404 DCHECK(method != "GET" && method != "HEAD"); | 405 DCHECK(method != "GET" && method != "HEAD"); |
| 405 const WebHTTPBody& httpBody = request.httpBody(); | 406 const WebHTTPBody& httpBody = request.httpBody(); |
| 406 size_t i = 0; | 407 size_t i = 0; |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 885 int intra_priority_value) { | 886 int intra_priority_value) { |
| 886 context_->DidChangePriority(new_priority, intra_priority_value); | 887 context_->DidChangePriority(new_priority, intra_priority_value); |
| 887 } | 888 } |
| 888 | 889 |
| 889 bool WebURLLoaderImpl::attachThreadedDataReceiver( | 890 bool WebURLLoaderImpl::attachThreadedDataReceiver( |
| 890 blink::WebThreadedDataReceiver* threaded_data_receiver) { | 891 blink::WebThreadedDataReceiver* threaded_data_receiver) { |
| 891 return context_->AttachThreadedDataReceiver(threaded_data_receiver); | 892 return context_->AttachThreadedDataReceiver(threaded_data_receiver); |
| 892 } | 893 } |
| 893 | 894 |
| 894 } // namespace content | 895 } // namespace content |
| OLD | NEW |