| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "public/platform/WebURLRequest.h" | 31 #include "public/platform/WebURLRequest.h" |
| 32 | 32 |
| 33 #include <memory> | 33 #include <memory> |
| 34 #include "platform/RuntimeEnabledFeatures.h" | |
| 35 #include "platform/loader/fetch/ResourceRequest.h" | 34 #include "platform/loader/fetch/ResourceRequest.h" |
| 36 #include "platform/wtf/Allocator.h" | 35 #include "platform/wtf/Allocator.h" |
| 37 #include "platform/wtf/Noncopyable.h" | 36 #include "platform/wtf/Noncopyable.h" |
| 38 #include "platform/wtf/PtrUtil.h" | 37 #include "platform/wtf/PtrUtil.h" |
| 39 #include "public/platform/WebCachePolicy.h" | 38 #include "public/platform/WebCachePolicy.h" |
| 40 #include "public/platform/WebHTTPBody.h" | 39 #include "public/platform/WebHTTPBody.h" |
| 41 #include "public/platform/WebHTTPHeaderVisitor.h" | 40 #include "public/platform/WebHTTPHeaderVisitor.h" |
| 42 #include "public/platform/WebSecurityOrigin.h" | 41 #include "public/platform/WebSecurityOrigin.h" |
| 43 #include "public/platform/WebURL.h" | 42 #include "public/platform/WebURL.h" |
| 44 | 43 |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 | 394 |
| 396 void WebURLRequest::SetUiStartTime(double time_seconds) { | 395 void WebURLRequest::SetUiStartTime(double time_seconds) { |
| 397 resource_request_->SetUIStartTime(time_seconds); | 396 resource_request_->SetUIStartTime(time_seconds); |
| 398 } | 397 } |
| 399 | 398 |
| 400 bool WebURLRequest::IsExternalRequest() const { | 399 bool WebURLRequest::IsExternalRequest() const { |
| 401 return resource_request_->IsExternalRequest(); | 400 return resource_request_->IsExternalRequest(); |
| 402 } | 401 } |
| 403 | 402 |
| 404 WebURLRequest::LoadingIPCType WebURLRequest::GetLoadingIPCType() const { | 403 WebURLRequest::LoadingIPCType WebURLRequest::GetLoadingIPCType() const { |
| 405 if (RuntimeEnabledFeatures::loadingWithMojoEnabled()) | 404 return resource_request_->GetLoadingIPCType(); |
| 406 return WebURLRequest::LoadingIPCType::kMojo; | |
| 407 return WebURLRequest::LoadingIPCType::kChromeIPC; | |
| 408 } | 405 } |
| 409 | 406 |
| 410 void WebURLRequest::SetNavigationStartTime(double navigation_start_seconds) { | 407 void WebURLRequest::SetNavigationStartTime(double navigation_start_seconds) { |
| 411 resource_request_->SetNavigationStartTime(navigation_start_seconds); | 408 resource_request_->SetNavigationStartTime(navigation_start_seconds); |
| 412 } | 409 } |
| 413 | 410 |
| 414 void WebURLRequest::SetIsSameDocumentNavigation(bool is_same_document) { | 411 void WebURLRequest::SetIsSameDocumentNavigation(bool is_same_document) { |
| 415 resource_request_->SetIsSameDocumentNavigation(is_same_document); | 412 resource_request_->SetIsSameDocumentNavigation(is_same_document); |
| 416 } | 413 } |
| 417 | 414 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 428 } | 425 } |
| 429 | 426 |
| 430 const ResourceRequest& WebURLRequest::ToResourceRequest() const { | 427 const ResourceRequest& WebURLRequest::ToResourceRequest() const { |
| 431 DCHECK(resource_request_); | 428 DCHECK(resource_request_); |
| 432 return *resource_request_; | 429 return *resource_request_; |
| 433 } | 430 } |
| 434 | 431 |
| 435 WebURLRequest::WebURLRequest(ResourceRequest& r) : resource_request_(&r) {} | 432 WebURLRequest::WebURLRequest(ResourceRequest& r) : resource_request_(&r) {} |
| 436 | 433 |
| 437 } // namespace blink | 434 } // namespace blink |
| OLD | NEW |