Chromium Code Reviews| 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/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 434 | 434 |
| 435 // TODO(horo): Check credentials flag is unset when credentials mode is omit. | 435 // TODO(horo): Check credentials flag is unset when credentials mode is omit. |
| 436 // Check credentials flag is set when credentials mode is include. | 436 // Check credentials flag is set when credentials mode is include. |
| 437 | 437 |
| 438 RequestInfo request_info; | 438 RequestInfo request_info; |
| 439 request_info.method = method; | 439 request_info.method = method; |
| 440 request_info.url = url; | 440 request_info.url = url; |
| 441 request_info.first_party_for_cookies = request.firstPartyForCookies(); | 441 request_info.first_party_for_cookies = request.firstPartyForCookies(); |
| 442 request_info.referrer = referrer_url; | 442 request_info.referrer = referrer_url; |
| 443 request_info.headers = GetWebURLRequestHeaders(request); | 443 request_info.headers = GetWebURLRequestHeaders(request); |
| 444 ; | 444 ; |
|
mmenke
2014/10/23 16:38:59
While you're here, mind removing this bonus semi-c
| |
| 445 request_info.load_flags = GetLoadFlagsForWebURLRequest(request); | 445 request_info.load_flags = GetLoadFlagsForWebURLRequest(request); |
| 446 request_info.enable_load_timing = true; | 446 request_info.enable_load_timing = true; |
| 447 request_info.enable_upload_progress = request.reportUploadProgress(); | |
| 447 // requestor_pid only needs to be non-zero if the request originates outside | 448 // requestor_pid only needs to be non-zero if the request originates outside |
| 448 // the render process, so we can use requestorProcessID even for requests | 449 // the render process, so we can use requestorProcessID even for requests |
| 449 // from in-process plugins. | 450 // from in-process plugins. |
| 450 request_info.requestor_pid = request.requestorProcessID(); | 451 request_info.requestor_pid = request.requestorProcessID(); |
| 451 request_info.request_type = WebURLRequestToResourceType(request); | 452 request_info.request_type = WebURLRequestToResourceType(request); |
| 452 request_info.priority = | 453 request_info.priority = |
| 453 ConvertWebKitPriorityToNetPriority(request.priority()); | 454 ConvertWebKitPriorityToNetPriority(request.priority()); |
| 454 request_info.appcache_host_id = request.appCacheHostID(); | 455 request_info.appcache_host_id = request.appCacheHostID(); |
| 455 request_info.routing_id = request.requestorID(); | 456 request_info.routing_id = request.requestorID(); |
| 456 request_info.download_to_file = request.downloadToFile(); | 457 request_info.download_to_file = request.downloadToFile(); |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 981 int intra_priority_value) { | 982 int intra_priority_value) { |
| 982 context_->DidChangePriority(new_priority, intra_priority_value); | 983 context_->DidChangePriority(new_priority, intra_priority_value); |
| 983 } | 984 } |
| 984 | 985 |
| 985 bool WebURLLoaderImpl::attachThreadedDataReceiver( | 986 bool WebURLLoaderImpl::attachThreadedDataReceiver( |
| 986 blink::WebThreadedDataReceiver* threaded_data_receiver) { | 987 blink::WebThreadedDataReceiver* threaded_data_receiver) { |
| 987 return context_->AttachThreadedDataReceiver(threaded_data_receiver); | 988 return context_->AttachThreadedDataReceiver(threaded_data_receiver); |
| 988 } | 989 } |
| 989 | 990 |
| 990 } // namespace content | 991 } // namespace content |
| OLD | NEW |