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 12 matching lines...) Expand all Loading... |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
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 "platform/RuntimeEnabledFeatures.h" |
33 #include "platform/network/ResourceRequest.h" | 34 #include "platform/network/ResourceRequest.h" |
34 #include "public/platform/WebCachePolicy.h" | 35 #include "public/platform/WebCachePolicy.h" |
35 #include "public/platform/WebHTTPBody.h" | 36 #include "public/platform/WebHTTPBody.h" |
36 #include "public/platform/WebHTTPHeaderVisitor.h" | 37 #include "public/platform/WebHTTPHeaderVisitor.h" |
37 #include "public/platform/WebSecurityOrigin.h" | 38 #include "public/platform/WebSecurityOrigin.h" |
38 #include "public/platform/WebURL.h" | 39 #include "public/platform/WebURL.h" |
39 #include "wtf/Allocator.h" | 40 #include "wtf/Allocator.h" |
40 #include "wtf/Noncopyable.h" | 41 #include "wtf/Noncopyable.h" |
41 #include "wtf/PtrUtil.h" | 42 #include "wtf/PtrUtil.h" |
42 #include <memory> | 43 #include <memory> |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 void WebURLRequest::setUiStartTime(double time) | 455 void WebURLRequest::setUiStartTime(double time) |
455 { | 456 { |
456 m_resourceRequest->setUIStartTime(time); | 457 m_resourceRequest->setUIStartTime(time); |
457 } | 458 } |
458 | 459 |
459 bool WebURLRequest::isExternalRequest() const | 460 bool WebURLRequest::isExternalRequest() const |
460 { | 461 { |
461 return m_resourceRequest->isExternalRequest(); | 462 return m_resourceRequest->isExternalRequest(); |
462 } | 463 } |
463 | 464 |
| 465 WebURLRequest::LoadingIPCType WebURLRequest::getLoadingIPCType() const |
| 466 { |
| 467 if (RuntimeEnabledFeatures::loadingWithMojoEnabled()) |
| 468 return WebURLRequest::LoadingIPCType::Mojo; |
| 469 return WebURLRequest::LoadingIPCType::ChromeIPC; |
| 470 } |
| 471 |
464 WebURLRequest::InputToLoadPerfMetricReportPolicy WebURLRequest::inputPerfMetricR
eportPolicy() const | 472 WebURLRequest::InputToLoadPerfMetricReportPolicy WebURLRequest::inputPerfMetricR
eportPolicy() const |
465 { | 473 { |
466 return static_cast<WebURLRequest::InputToLoadPerfMetricReportPolicy>( | 474 return static_cast<WebURLRequest::InputToLoadPerfMetricReportPolicy>( |
467 m_resourceRequest->inputPerfMetricReportPolicy()); | 475 m_resourceRequest->inputPerfMetricReportPolicy()); |
468 } | 476 } |
469 | 477 |
470 void WebURLRequest::setInputPerfMetricReportPolicy( | 478 void WebURLRequest::setInputPerfMetricReportPolicy( |
471 WebURLRequest::InputToLoadPerfMetricReportPolicy policy) | 479 WebURLRequest::InputToLoadPerfMetricReportPolicy policy) |
472 { | 480 { |
473 m_resourceRequest->setInputPerfMetricReportPolicy( | 481 m_resourceRequest->setInputPerfMetricReportPolicy( |
474 static_cast<blink::InputToLoadPerfMetricReportPolicy>(policy)); | 482 static_cast<blink::InputToLoadPerfMetricReportPolicy>(policy)); |
475 } | 483 } |
476 | 484 |
477 const ResourceRequest& WebURLRequest::toResourceRequest() const | 485 const ResourceRequest& WebURLRequest::toResourceRequest() const |
478 { | 486 { |
479 DCHECK(m_resourceRequest); | 487 DCHECK(m_resourceRequest); |
480 return *m_resourceRequest; | 488 return *m_resourceRequest; |
481 } | 489 } |
482 | 490 |
483 WebURLRequest::WebURLRequest(ResourceRequest& r) | 491 WebURLRequest::WebURLRequest(ResourceRequest& r) |
484 : m_resourceRequest(&r) | 492 : m_resourceRequest(&r) |
485 { | 493 { |
486 } | 494 } |
487 | 495 |
488 } // namespace blink | 496 } // namespace blink |
OLD | NEW |