| 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 <algorithm> | 9 #include <algorithm> |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 RequestInfo request_info; | 479 RequestInfo request_info; |
| 480 request_info.method = method; | 480 request_info.method = method; |
| 481 request_info.url = url; | 481 request_info.url = url; |
| 482 request_info.first_party_for_cookies = request.firstPartyForCookies(); | 482 request_info.first_party_for_cookies = request.firstPartyForCookies(); |
| 483 referrer_policy_ = request.referrerPolicy(); | 483 referrer_policy_ = request.referrerPolicy(); |
| 484 request_info.referrer = Referrer(referrer_url, referrer_policy_); | 484 request_info.referrer = Referrer(referrer_url, referrer_policy_); |
| 485 request_info.headers = GetWebURLRequestHeaders(request); | 485 request_info.headers = GetWebURLRequestHeaders(request); |
| 486 request_info.load_flags = GetLoadFlagsForWebURLRequest(request); | 486 request_info.load_flags = GetLoadFlagsForWebURLRequest(request); |
| 487 request_info.enable_load_timing = true; | 487 request_info.enable_load_timing = true; |
| 488 request_info.enable_upload_progress = request.reportUploadProgress(); | 488 request_info.enable_upload_progress = request.reportUploadProgress(); |
| 489 if (request.requestContext() == WebURLRequest::RequestContextXMLHttpRequest && |
| 490 (url.has_username() || url.has_password())) { |
| 491 request_info.do_not_prompt_for_login = true; |
| 492 } |
| 489 // requestor_pid only needs to be non-zero if the request originates outside | 493 // requestor_pid only needs to be non-zero if the request originates outside |
| 490 // the render process, so we can use requestorProcessID even for requests | 494 // the render process, so we can use requestorProcessID even for requests |
| 491 // from in-process plugins. | 495 // from in-process plugins. |
| 492 request_info.requestor_pid = request.requestorProcessID(); | 496 request_info.requestor_pid = request.requestorProcessID(); |
| 493 request_info.request_type = WebURLRequestToResourceType(request); | 497 request_info.request_type = WebURLRequestToResourceType(request); |
| 494 request_info.priority = | 498 request_info.priority = |
| 495 ConvertWebKitPriorityToNetPriority(request.priority()); | 499 ConvertWebKitPriorityToNetPriority(request.priority()); |
| 496 request_info.appcache_host_id = request.appCacheHostID(); | 500 request_info.appcache_host_id = request.appCacheHostID(); |
| 497 request_info.routing_id = request.requestorID(); | 501 request_info.routing_id = request.requestorID(); |
| 498 request_info.download_to_file = request.downloadToFile(); | 502 request_info.download_to_file = request.downloadToFile(); |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 int intra_priority_value) { | 1135 int intra_priority_value) { |
| 1132 context_->DidChangePriority(new_priority, intra_priority_value); | 1136 context_->DidChangePriority(new_priority, intra_priority_value); |
| 1133 } | 1137 } |
| 1134 | 1138 |
| 1135 bool WebURLLoaderImpl::attachThreadedDataReceiver( | 1139 bool WebURLLoaderImpl::attachThreadedDataReceiver( |
| 1136 blink::WebThreadedDataReceiver* threaded_data_receiver) { | 1140 blink::WebThreadedDataReceiver* threaded_data_receiver) { |
| 1137 return context_->AttachThreadedDataReceiver(threaded_data_receiver); | 1141 return context_->AttachThreadedDataReceiver(threaded_data_receiver); |
| 1138 } | 1142 } |
| 1139 | 1143 |
| 1140 } // namespace content | 1144 } // namespace content |
| OLD | NEW |