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