| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
| 4 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 4 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #ifndef ResourceRequest_h | 28 #ifndef ResourceRequest_h |
| 29 #define ResourceRequest_h | 29 #define ResourceRequest_h |
| 30 | 30 |
| 31 #include <memory> |
| 31 #include "platform/HTTPNames.h" | 32 #include "platform/HTTPNames.h" |
| 32 #include "platform/network/EncodedFormData.h" | 33 #include "platform/network/EncodedFormData.h" |
| 33 #include "platform/network/HTTPHeaderMap.h" | 34 #include "platform/network/HTTPHeaderMap.h" |
| 34 #include "platform/network/HTTPParsers.h" | 35 #include "platform/network/HTTPParsers.h" |
| 35 #include "platform/network/ResourceLoadPriority.h" | 36 #include "platform/network/ResourceLoadPriority.h" |
| 36 #include "platform/weborigin/KURL.h" | 37 #include "platform/weborigin/KURL.h" |
| 37 #include "platform/weborigin/Referrer.h" | 38 #include "platform/weborigin/Referrer.h" |
| 38 #include "platform/weborigin/SecurityOrigin.h" | 39 #include "platform/weborigin/SecurityOrigin.h" |
| 39 #include "public/platform/WebAddressSpace.h" | 40 #include "public/platform/WebAddressSpace.h" |
| 41 #include "public/platform/WebInsecureRequestPolicy.h" |
| 40 #include "public/platform/WebURLRequest.h" | 42 #include "public/platform/WebURLRequest.h" |
| 41 #include "wtf/RefCounted.h" | 43 #include "wtf/RefCounted.h" |
| 42 #include <memory> | |
| 43 | 44 |
| 44 namespace blink { | 45 namespace blink { |
| 45 | 46 |
| 46 enum class WebCachePolicy; | 47 enum class WebCachePolicy; |
| 47 | 48 |
| 48 enum class ResourceRequestBlockedReason { | 49 enum class ResourceRequestBlockedReason { |
| 49 CSP, | 50 CSP, |
| 50 MixedContent, | 51 MixedContent, |
| 51 Origin, | 52 Origin, |
| 52 Inspector, | 53 Inspector, |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 | 290 |
| 290 double uiStartTime() const { return m_uiStartTime; } | 291 double uiStartTime() const { return m_uiStartTime; } |
| 291 void setUIStartTime(double uiStartTimeSeconds) { | 292 void setUIStartTime(double uiStartTimeSeconds) { |
| 292 m_uiStartTime = uiStartTimeSeconds; | 293 m_uiStartTime = uiStartTimeSeconds; |
| 293 } | 294 } |
| 294 | 295 |
| 295 // https://mikewest.github.io/cors-rfc1918/#external-request | 296 // https://mikewest.github.io/cors-rfc1918/#external-request |
| 296 bool isExternalRequest() const { return m_isExternalRequest; } | 297 bool isExternalRequest() const { return m_isExternalRequest; } |
| 297 void setExternalRequestStateFromRequestorAddressSpace(WebAddressSpace); | 298 void setExternalRequestStateFromRequestorAddressSpace(WebAddressSpace); |
| 298 | 299 |
| 300 // This maps to the "Insecure Requests Policy" concept defined in |
| 301 // https://w3c.github.io/webappsec-upgrade-insecure-requests/#insecure-request
s-policy |
| 302 WebInsecureRequestPolicy getInsecureRequestPolicy() const { |
| 303 return m_insecureRequestPolicy; |
| 304 } |
| 305 void setInsecureRequestPolicy(WebInsecureRequestPolicy policy) { |
| 306 m_insecureRequestPolicy = policy; |
| 307 } |
| 308 |
| 299 InputToLoadPerfMetricReportPolicy inputPerfMetricReportPolicy() const { | 309 InputToLoadPerfMetricReportPolicy inputPerfMetricReportPolicy() const { |
| 300 return m_inputPerfMetricReportPolicy; | 310 return m_inputPerfMetricReportPolicy; |
| 301 } | 311 } |
| 302 void setInputPerfMetricReportPolicy( | 312 void setInputPerfMetricReportPolicy( |
| 303 InputToLoadPerfMetricReportPolicy inputPerfMetricReportPolicy) { | 313 InputToLoadPerfMetricReportPolicy inputPerfMetricReportPolicy) { |
| 304 m_inputPerfMetricReportPolicy = inputPerfMetricReportPolicy; | 314 m_inputPerfMetricReportPolicy = inputPerfMetricReportPolicy; |
| 305 } | 315 } |
| 306 | 316 |
| 307 void setRedirectStatus(RedirectStatus status) { m_redirectStatus = status; } | 317 void setRedirectStatus(RedirectStatus status) { m_redirectStatus = status; } |
| 308 RedirectStatus redirectStatus() const { return m_redirectStatus; } | 318 RedirectStatus redirectStatus() const { return m_redirectStatus; } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 WebURLRequest::FetchRequestMode m_fetchRequestMode; | 359 WebURLRequest::FetchRequestMode m_fetchRequestMode; |
| 350 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode; | 360 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode; |
| 351 WebURLRequest::FetchRedirectMode m_fetchRedirectMode; | 361 WebURLRequest::FetchRedirectMode m_fetchRedirectMode; |
| 352 WebURLRequest::PreviewsState m_previewsState; | 362 WebURLRequest::PreviewsState m_previewsState; |
| 353 ReferrerPolicy m_referrerPolicy; | 363 ReferrerPolicy m_referrerPolicy; |
| 354 bool m_didSetHTTPReferrer; | 364 bool m_didSetHTTPReferrer; |
| 355 bool m_checkForBrowserSideNavigation; | 365 bool m_checkForBrowserSideNavigation; |
| 356 double m_uiStartTime; | 366 double m_uiStartTime; |
| 357 bool m_isExternalRequest; | 367 bool m_isExternalRequest; |
| 358 bool m_isSameDocumentNavigation; | 368 bool m_isSameDocumentNavigation; |
| 369 WebInsecureRequestPolicy m_insecureRequestPolicy; |
| 359 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; | 370 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; |
| 360 | 371 |
| 361 mutable CacheControlHeader m_cacheControlHeaderCache; | 372 mutable CacheControlHeader m_cacheControlHeaderCache; |
| 362 | 373 |
| 363 static double s_defaultTimeoutInterval; | 374 static double s_defaultTimeoutInterval; |
| 364 | 375 |
| 365 RedirectStatus m_redirectStatus; | 376 RedirectStatus m_redirectStatus; |
| 366 | 377 |
| 367 double m_navigationStart = 0; | 378 double m_navigationStart = 0; |
| 368 }; | 379 }; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 WebURLRequest::FrameType m_frameType; | 411 WebURLRequest::FrameType m_frameType; |
| 401 WebURLRequest::FetchRequestMode m_fetchRequestMode; | 412 WebURLRequest::FetchRequestMode m_fetchRequestMode; |
| 402 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode; | 413 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode; |
| 403 WebURLRequest::FetchRedirectMode m_fetchRedirectMode; | 414 WebURLRequest::FetchRedirectMode m_fetchRedirectMode; |
| 404 WebURLRequest::PreviewsState m_previewsState; | 415 WebURLRequest::PreviewsState m_previewsState; |
| 405 ReferrerPolicy m_referrerPolicy; | 416 ReferrerPolicy m_referrerPolicy; |
| 406 bool m_didSetHTTPReferrer; | 417 bool m_didSetHTTPReferrer; |
| 407 bool m_checkForBrowserSideNavigation; | 418 bool m_checkForBrowserSideNavigation; |
| 408 double m_uiStartTime; | 419 double m_uiStartTime; |
| 409 bool m_isExternalRequest; | 420 bool m_isExternalRequest; |
| 421 WebInsecureRequestPolicy m_insecureRequestPolicy; |
| 410 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; | 422 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; |
| 411 ResourceRequest::RedirectStatus m_redirectStatus; | 423 ResourceRequest::RedirectStatus m_redirectStatus; |
| 412 }; | 424 }; |
| 413 | 425 |
| 414 } // namespace blink | 426 } // namespace blink |
| 415 | 427 |
| 416 #endif // ResourceRequest_h | 428 #endif // ResourceRequest_h |
| OLD | NEW |