| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/glue/weburlloader_impl.h" | 7 #include "webkit/glue/weburlloader_impl.h" |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 | 403 |
| 404 HeaderFlattener flattener(load_flags); | 404 HeaderFlattener flattener(load_flags); |
| 405 request.visitHTTPHeaderFields(&flattener); | 405 request.visitHTTPHeaderFields(&flattener); |
| 406 | 406 |
| 407 // TODO(brettw) this should take parameter encoding into account when | 407 // TODO(brettw) this should take parameter encoding into account when |
| 408 // creating the GURLs. | 408 // creating the GURLs. |
| 409 | 409 |
| 410 ResourceLoaderBridge::RequestInfo request_info; | 410 ResourceLoaderBridge::RequestInfo request_info; |
| 411 request_info.method = method; | 411 request_info.method = method; |
| 412 request_info.url = url; | 412 request_info.url = url; |
| 413 request_info.virtual_url = request.virtualURL(); |
| 413 request_info.first_party_for_cookies = request.firstPartyForCookies(); | 414 request_info.first_party_for_cookies = request.firstPartyForCookies(); |
| 414 request_info.referrer = referrer_url; | 415 request_info.referrer = referrer_url; |
| 415 request_info.headers = flattener.GetBuffer(); | 416 request_info.headers = flattener.GetBuffer(); |
| 416 request_info.load_flags = load_flags; | 417 request_info.load_flags = load_flags; |
| 417 // requestor_pid only needs to be non-zero if the request originates outside | 418 // requestor_pid only needs to be non-zero if the request originates outside |
| 418 // the render process, so we can use requestorProcessID even for requests | 419 // the render process, so we can use requestorProcessID even for requests |
| 419 // from in-process plugins. | 420 // from in-process plugins. |
| 420 request_info.requestor_pid = request.requestorProcessID(); | 421 request_info.requestor_pid = request.requestorProcessID(); |
| 421 request_info.request_type = | 422 request_info.request_type = |
| 422 ResourceType::FromTargetType(request.targetType()); | 423 ResourceType::FromTargetType(request.targetType()); |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 | 753 |
| 753 void WebURLLoaderImpl::setDefersLoading(bool value) { | 754 void WebURLLoaderImpl::setDefersLoading(bool value) { |
| 754 context_->SetDefersLoading(value); | 755 context_->SetDefersLoading(value); |
| 755 } | 756 } |
| 756 | 757 |
| 757 void WebURLLoaderImpl::UpdateRoutingId(int new_routing_id) { | 758 void WebURLLoaderImpl::UpdateRoutingId(int new_routing_id) { |
| 758 context_->UpdateRoutingId(new_routing_id); | 759 context_->UpdateRoutingId(new_routing_id); |
| 759 } | 760 } |
| 760 | 761 |
| 761 } // namespace webkit_glue | 762 } // namespace webkit_glue |
| OLD | NEW |