| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 struct CrossThreadResourceRequestData; | 57 struct CrossThreadResourceRequestData; |
| 58 | 58 |
| 59 class PLATFORM_EXPORT ResourceRequest { | 59 class PLATFORM_EXPORT ResourceRequest { |
| 60 WTF_MAKE_FAST_ALLOCATED(ResourceRequest); | 60 WTF_MAKE_FAST_ALLOCATED(ResourceRequest); |
| 61 public: | 61 public: |
| 62 class ExtraData : public RefCounted<ExtraData> { | 62 class ExtraData : public RefCounted<ExtraData> { |
| 63 public: | 63 public: |
| 64 virtual ~ExtraData() { } | 64 virtual ~ExtraData() { } |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 enum ContextType { |
| 68 ContextTypeNotMixedContent, |
| 69 ContextTypeBlockable, |
| 70 ContextTypeOptionallyBlockable, |
| 71 ContextTypeShouldBeBlockable, |
| 72 }; |
| 73 |
| 67 ResourceRequest() | 74 ResourceRequest() |
| 68 { | 75 { |
| 69 initialize(KURL()); | 76 initialize(KURL()); |
| 70 } | 77 } |
| 71 | 78 |
| 72 ResourceRequest(const String& urlString) | 79 ResourceRequest(const String& urlString) |
| 73 { | 80 { |
| 74 initialize(KURL(ParsedURLString, urlString)); | 81 initialize(KURL(ParsedURLString, urlString)); |
| 75 } | 82 } |
| 76 | 83 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 233 |
| 227 bool originatesFromReservedIPRange() const { return m_originatesFromReserved
IPRange; } | 234 bool originatesFromReservedIPRange() const { return m_originatesFromReserved
IPRange; } |
| 228 void setOriginatesFromReservedIPRange(bool value) { m_originatesFromReserved
IPRange = value; } | 235 void setOriginatesFromReservedIPRange(bool value) { m_originatesFromReserved
IPRange = value; } |
| 229 | 236 |
| 230 InputToLoadPerfMetricReportPolicy inputPerfMetricReportPolicy() const { retu
rn m_inputPerfMetricReportPolicy; } | 237 InputToLoadPerfMetricReportPolicy inputPerfMetricReportPolicy() const { retu
rn m_inputPerfMetricReportPolicy; } |
| 231 void setInputPerfMetricReportPolicy(InputToLoadPerfMetricReportPolicy inputP
erfMetricReportPolicy) { m_inputPerfMetricReportPolicy = inputPerfMetricReportPo
licy; } | 238 void setInputPerfMetricReportPolicy(InputToLoadPerfMetricReportPolicy inputP
erfMetricReportPolicy) { m_inputPerfMetricReportPolicy = inputPerfMetricReportPo
licy; } |
| 232 | 239 |
| 233 void setFollowedRedirect(bool followed) { m_followedRedirect = followed; } | 240 void setFollowedRedirect(bool followed) { m_followedRedirect = followed; } |
| 234 bool followedRedirect() const { return m_followedRedirect; } | 241 bool followedRedirect() const { return m_followedRedirect; } |
| 235 | 242 |
| 243 void setContextType(ContextType contextType) { m_contextType = contextType;
} |
| 244 ContextType contextType() const { return m_contextType; } |
| 245 |
| 236 private: | 246 private: |
| 237 void initialize(const KURL&); | 247 void initialize(const KURL&); |
| 238 | 248 |
| 239 const CacheControlHeader& cacheControlHeader() const; | 249 const CacheControlHeader& cacheControlHeader() const; |
| 240 | 250 |
| 241 KURL m_url; | 251 KURL m_url; |
| 242 ResourceRequestCachePolicy m_cachePolicy; | 252 ResourceRequestCachePolicy m_cachePolicy; |
| 243 double m_timeoutInterval; // 0 is a magic value for platform default on plat
forms that have one. | 253 double m_timeoutInterval; // 0 is a magic value for platform default on plat
forms that have one. |
| 244 KURL m_firstPartyForCookies; | 254 KURL m_firstPartyForCookies; |
| 245 RefPtr<SecurityOrigin> m_requestorOrigin; | 255 RefPtr<SecurityOrigin> m_requestorOrigin; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 270 bool m_checkForBrowserSideNavigation; | 280 bool m_checkForBrowserSideNavigation; |
| 271 double m_uiStartTime; | 281 double m_uiStartTime; |
| 272 bool m_originatesFromReservedIPRange; | 282 bool m_originatesFromReservedIPRange; |
| 273 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; | 283 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; |
| 274 | 284 |
| 275 mutable CacheControlHeader m_cacheControlHeaderCache; | 285 mutable CacheControlHeader m_cacheControlHeaderCache; |
| 276 | 286 |
| 277 static double s_defaultTimeoutInterval; | 287 static double s_defaultTimeoutInterval; |
| 278 | 288 |
| 279 bool m_followedRedirect; | 289 bool m_followedRedirect; |
| 290 |
| 291 ContextType m_contextType; |
| 280 }; | 292 }; |
| 281 | 293 |
| 282 bool equalIgnoringHeaderFields(const ResourceRequest&, const ResourceRequest&); | 294 bool equalIgnoringHeaderFields(const ResourceRequest&, const ResourceRequest&); |
| 283 | 295 |
| 284 inline bool operator==(const ResourceRequest& a, const ResourceRequest& b) { ret
urn ResourceRequest::compare(a, b); } | 296 inline bool operator==(const ResourceRequest& a, const ResourceRequest& b) { ret
urn ResourceRequest::compare(a, b); } |
| 285 inline bool operator!=(ResourceRequest& a, const ResourceRequest& b) { return !(
a == b); } | 297 inline bool operator!=(ResourceRequest& a, const ResourceRequest& b) { return !(
a == b); } |
| 286 | 298 |
| 287 struct CrossThreadResourceRequestData { | 299 struct CrossThreadResourceRequestData { |
| 288 WTF_MAKE_NONCOPYABLE(CrossThreadResourceRequestData); WTF_MAKE_FAST_ALLOCATE
D(CrossThreadResourceRequestData); | 300 WTF_MAKE_NONCOPYABLE(CrossThreadResourceRequestData); WTF_MAKE_FAST_ALLOCATE
D(CrossThreadResourceRequestData); |
| 289 public: | 301 public: |
| (...skipping 25 matching lines...) Expand all Loading... |
| 315 WebURLRequest::FetchRequestMode m_fetchRequestMode; | 327 WebURLRequest::FetchRequestMode m_fetchRequestMode; |
| 316 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode; | 328 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode; |
| 317 WebURLRequest::FetchRedirectMode m_fetchRedirectMode; | 329 WebURLRequest::FetchRedirectMode m_fetchRedirectMode; |
| 318 ReferrerPolicy m_referrerPolicy; | 330 ReferrerPolicy m_referrerPolicy; |
| 319 bool m_didSetHTTPReferrer; | 331 bool m_didSetHTTPReferrer; |
| 320 bool m_checkForBrowserSideNavigation; | 332 bool m_checkForBrowserSideNavigation; |
| 321 double m_uiStartTime; | 333 double m_uiStartTime; |
| 322 bool m_originatesFromReservedIPRange; | 334 bool m_originatesFromReservedIPRange; |
| 323 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; | 335 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; |
| 324 bool m_followedRedirect; | 336 bool m_followedRedirect; |
| 337 ResourceRequest::ContextType m_contextType; |
| 325 }; | 338 }; |
| 326 | 339 |
| 327 } // namespace blink | 340 } // namespace blink |
| 328 | 341 |
| 329 #endif // ResourceRequest_h | 342 #endif // ResourceRequest_h |
| OLD | NEW |