Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: third_party/WebKit/Source/platform/network/ResourceRequest.h

Issue 1749153002: CORS-RFC1918: Teach ResourceRequest about "external" requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Jochen's feedback. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 bool hasCacheValidatorFields() const; 231 bool hasCacheValidatorFields() const;
232 232
233 static bool compare(const ResourceRequest&, const ResourceRequest&); 233 static bool compare(const ResourceRequest&, const ResourceRequest&);
234 234
235 bool checkForBrowserSideNavigation() const { return m_checkForBrowserSideNav igation; } 235 bool checkForBrowserSideNavigation() const { return m_checkForBrowserSideNav igation; }
236 void setCheckForBrowserSideNavigation(bool check) { m_checkForBrowserSideNav igation = check; } 236 void setCheckForBrowserSideNavigation(bool check) { m_checkForBrowserSideNav igation = check; }
237 237
238 double uiStartTime() const { return m_uiStartTime; } 238 double uiStartTime() const { return m_uiStartTime; }
239 void setUIStartTime(double uiStartTime) { m_uiStartTime = uiStartTime; } 239 void setUIStartTime(double uiStartTime) { m_uiStartTime = uiStartTime; }
240 240
241 bool originatesFromReservedIPRange() const { return m_originatesFromReserved IPRange; } 241 // https://mikewest.github.io/cors-rfc1918/#external-request
242 void setOriginatesFromReservedIPRange(bool value) { m_originatesFromReserved IPRange = value; } 242 bool isExternalRequest() const { return m_isExternalRequest; }
243 void setExternalRequestStateFromRequestorAddressSpace(WebURLRequest::Address Space);
243 244
244 InputToLoadPerfMetricReportPolicy inputPerfMetricReportPolicy() const { retu rn m_inputPerfMetricReportPolicy; } 245 InputToLoadPerfMetricReportPolicy inputPerfMetricReportPolicy() const { retu rn m_inputPerfMetricReportPolicy; }
245 void setInputPerfMetricReportPolicy(InputToLoadPerfMetricReportPolicy inputP erfMetricReportPolicy) { m_inputPerfMetricReportPolicy = inputPerfMetricReportPo licy; } 246 void setInputPerfMetricReportPolicy(InputToLoadPerfMetricReportPolicy inputP erfMetricReportPolicy) { m_inputPerfMetricReportPolicy = inputPerfMetricReportPo licy; }
246 247
247 void setFollowedRedirect(bool followed) { m_followedRedirect = followed; } 248 void setFollowedRedirect(bool followed) { m_followedRedirect = followed; }
248 bool followedRedirect() const { return m_followedRedirect; } 249 bool followedRedirect() const { return m_followedRedirect; }
249 250
250 private: 251 private:
251 void initialize(const KURL&); 252 void initialize(const KURL&);
252 253
(...skipping 24 matching lines...) Expand all
277 WebURLRequest::RequestContext m_requestContext; 278 WebURLRequest::RequestContext m_requestContext;
278 WebURLRequest::FrameType m_frameType; 279 WebURLRequest::FrameType m_frameType;
279 WebURLRequest::FetchRequestMode m_fetchRequestMode; 280 WebURLRequest::FetchRequestMode m_fetchRequestMode;
280 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode; 281 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode;
281 WebURLRequest::FetchRedirectMode m_fetchRedirectMode; 282 WebURLRequest::FetchRedirectMode m_fetchRedirectMode;
282 WebURLRequest::LoFiState m_loFiState; 283 WebURLRequest::LoFiState m_loFiState;
283 ReferrerPolicy m_referrerPolicy; 284 ReferrerPolicy m_referrerPolicy;
284 bool m_didSetHTTPReferrer; 285 bool m_didSetHTTPReferrer;
285 bool m_checkForBrowserSideNavigation; 286 bool m_checkForBrowserSideNavigation;
286 double m_uiStartTime; 287 double m_uiStartTime;
287 bool m_originatesFromReservedIPRange; 288 bool m_isExternalRequest;
288 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; 289 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy;
289 290
290 mutable CacheControlHeader m_cacheControlHeaderCache; 291 mutable CacheControlHeader m_cacheControlHeaderCache;
291 292
292 static double s_defaultTimeoutInterval; 293 static double s_defaultTimeoutInterval;
293 294
294 bool m_followedRedirect; 295 bool m_followedRedirect;
295 }; 296 };
296 297
297 bool equalIgnoringHeaderFields(const ResourceRequest&, const ResourceRequest&); 298 bool equalIgnoringHeaderFields(const ResourceRequest&, const ResourceRequest&);
(...skipping 30 matching lines...) Expand all
328 WebURLRequest::RequestContext m_requestContext; 329 WebURLRequest::RequestContext m_requestContext;
329 WebURLRequest::FrameType m_frameType; 330 WebURLRequest::FrameType m_frameType;
330 WebURLRequest::FetchRequestMode m_fetchRequestMode; 331 WebURLRequest::FetchRequestMode m_fetchRequestMode;
331 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode; 332 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode;
332 WebURLRequest::FetchRedirectMode m_fetchRedirectMode; 333 WebURLRequest::FetchRedirectMode m_fetchRedirectMode;
333 WebURLRequest::LoFiState m_loFiState; 334 WebURLRequest::LoFiState m_loFiState;
334 ReferrerPolicy m_referrerPolicy; 335 ReferrerPolicy m_referrerPolicy;
335 bool m_didSetHTTPReferrer; 336 bool m_didSetHTTPReferrer;
336 bool m_checkForBrowserSideNavigation; 337 bool m_checkForBrowserSideNavigation;
337 double m_uiStartTime; 338 double m_uiStartTime;
338 bool m_originatesFromReservedIPRange; 339 bool m_isExternalRequest;
339 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; 340 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy;
340 bool m_followedRedirect; 341 bool m_followedRedirect;
341 }; 342 };
342 343
343 } // namespace blink 344 } // namespace blink
344 345
345 #endif // ResourceRequest_h 346 #endif // ResourceRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698