| 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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 RequestInfo request_info; | 466 RequestInfo request_info; |
| 467 request_info.method = method; | 467 request_info.method = method; |
| 468 request_info.url = url; | 468 request_info.url = url; |
| 469 request_info.first_party_for_cookies = request.firstPartyForCookies(); | 469 request_info.first_party_for_cookies = request.firstPartyForCookies(); |
| 470 referrer_policy_ = request.referrerPolicy(); | 470 referrer_policy_ = request.referrerPolicy(); |
| 471 request_info.referrer = Referrer(referrer_url, referrer_policy_); | 471 request_info.referrer = Referrer(referrer_url, referrer_policy_); |
| 472 request_info.headers = GetWebURLRequestHeaders(request); | 472 request_info.headers = GetWebURLRequestHeaders(request); |
| 473 request_info.load_flags = GetLoadFlagsForWebURLRequest(request); | 473 request_info.load_flags = GetLoadFlagsForWebURLRequest(request); |
| 474 request_info.enable_load_timing = true; | 474 request_info.enable_load_timing = true; |
| 475 request_info.enable_upload_progress = request.reportUploadProgress(); | 475 request_info.enable_upload_progress = request.reportUploadProgress(); |
| 476 if (request.requestContext() == WebURLRequest::RequestContextXMLHttpRequest && |
| 477 (url.has_username() || url.has_password())) { |
| 478 request_info.do_not_prompt_for_login = true; |
| 479 } |
| 476 // requestor_pid only needs to be non-zero if the request originates outside | 480 // requestor_pid only needs to be non-zero if the request originates outside |
| 477 // the render process, so we can use requestorProcessID even for requests | 481 // the render process, so we can use requestorProcessID even for requests |
| 478 // from in-process plugins. | 482 // from in-process plugins. |
| 479 request_info.requestor_pid = request.requestorProcessID(); | 483 request_info.requestor_pid = request.requestorProcessID(); |
| 480 request_info.request_type = WebURLRequestToResourceType(request); | 484 request_info.request_type = WebURLRequestToResourceType(request); |
| 481 request_info.priority = | 485 request_info.priority = |
| 482 ConvertWebKitPriorityToNetPriority(request.priority()); | 486 ConvertWebKitPriorityToNetPriority(request.priority()); |
| 483 request_info.appcache_host_id = request.appCacheHostID(); | 487 request_info.appcache_host_id = request.appCacheHostID(); |
| 484 request_info.routing_id = request.requestorID(); | 488 request_info.routing_id = request.requestorID(); |
| 485 request_info.download_to_file = request.downloadToFile(); | 489 request_info.download_to_file = request.downloadToFile(); |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1159 int intra_priority_value) { | 1163 int intra_priority_value) { |
| 1160 context_->DidChangePriority(new_priority, intra_priority_value); | 1164 context_->DidChangePriority(new_priority, intra_priority_value); |
| 1161 } | 1165 } |
| 1162 | 1166 |
| 1163 bool WebURLLoaderImpl::attachThreadedDataReceiver( | 1167 bool WebURLLoaderImpl::attachThreadedDataReceiver( |
| 1164 blink::WebThreadedDataReceiver* threaded_data_receiver) { | 1168 blink::WebThreadedDataReceiver* threaded_data_receiver) { |
| 1165 return context_->AttachThreadedDataReceiver(threaded_data_receiver); | 1169 return context_->AttachThreadedDataReceiver(threaded_data_receiver); |
| 1166 } | 1170 } |
| 1167 | 1171 |
| 1168 } // namespace content | 1172 } // namespace content |
| OLD | NEW |