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

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

Issue 2316573002: PlzNavigate: Support ResourceTiming API (Closed)
Patch Set: Move redirect response inside the final response. Created 4 years, 3 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 // Gets a copy of the data suitable for passing to another thread. 83 // Gets a copy of the data suitable for passing to another thread.
84 std::unique_ptr<CrossThreadResourceRequestData> copyData() const; 84 std::unique_ptr<CrossThreadResourceRequestData> copyData() const;
85 85
86 bool isNull() const; 86 bool isNull() const;
87 bool isEmpty() const; 87 bool isEmpty() const;
88 88
89 const KURL& url() const; 89 const KURL& url() const;
90 void setURL(const KURL& url); 90 void setURL(const KURL& url);
91 91
92 const KURL& initialUrl() const;
93 void setInitialURL(const KURL&);
Nate Chapin 2016/09/08 18:41:13 Can we pull the initialURL off ResourceResponse, s
arthursonzogni 2016/09/09 12:45:33 That is certainly one reason why I liked having th
94
92 void removeCredentials(); 95 void removeCredentials();
93 96
94 WebCachePolicy getCachePolicy() const; 97 WebCachePolicy getCachePolicy() const;
95 void setCachePolicy(WebCachePolicy); 98 void setCachePolicy(WebCachePolicy);
96 99
97 double timeoutInterval() const; // May return 0 when using platform default. 100 double timeoutInterval() const; // May return 0 when using platform default.
98 void setTimeoutInterval(double timeoutInterval); 101 void setTimeoutInterval(double timeoutInterval);
99 102
100 const KURL& firstPartyForCookies() const; 103 const KURL& firstPartyForCookies() const;
101 void setFirstPartyForCookies(const KURL& firstPartyForCookies); 104 void setFirstPartyForCookies(const KURL& firstPartyForCookies);
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // https://mikewest.github.io/cors-rfc1918/#external-request 233 // https://mikewest.github.io/cors-rfc1918/#external-request
231 bool isExternalRequest() const { return m_isExternalRequest; } 234 bool isExternalRequest() const { return m_isExternalRequest; }
232 void setExternalRequestStateFromRequestorAddressSpace(WebAddressSpace); 235 void setExternalRequestStateFromRequestorAddressSpace(WebAddressSpace);
233 236
234 InputToLoadPerfMetricReportPolicy inputPerfMetricReportPolicy() const { retu rn m_inputPerfMetricReportPolicy; } 237 InputToLoadPerfMetricReportPolicy inputPerfMetricReportPolicy() const { retu rn m_inputPerfMetricReportPolicy; }
235 void setInputPerfMetricReportPolicy(InputToLoadPerfMetricReportPolicy inputP erfMetricReportPolicy) { m_inputPerfMetricReportPolicy = inputPerfMetricReportPo licy; } 238 void setInputPerfMetricReportPolicy(InputToLoadPerfMetricReportPolicy inputP erfMetricReportPolicy) { m_inputPerfMetricReportPolicy = inputPerfMetricReportPo licy; }
236 239
237 void setRedirectStatus(RedirectStatus status) { m_redirectStatus = status; } 240 void setRedirectStatus(RedirectStatus status) { m_redirectStatus = status; }
238 RedirectStatus redirectStatus() const { return m_redirectStatus; } 241 RedirectStatus redirectStatus() const { return m_redirectStatus; }
239 242
243 void setNavigationStartTime(double);
244 double navigationStartTime() const { return m_navigationStart; }
245
240 private: 246 private:
241 void initialize(const KURL&); 247 void initialize(const KURL&);
242 248
243 const CacheControlHeader& cacheControlHeader() const; 249 const CacheControlHeader& cacheControlHeader() const;
244 250
245 KURL m_url; 251 KURL m_url;
246 WebCachePolicy m_cachePolicy; 252 WebCachePolicy m_cachePolicy;
247 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.
248 KURL m_firstPartyForCookies; 254 KURL m_firstPartyForCookies;
249 RefPtr<SecurityOrigin> m_requestorOrigin; 255 RefPtr<SecurityOrigin> m_requestorOrigin;
(...skipping 26 matching lines...) Expand all
276 bool m_checkForBrowserSideNavigation; 282 bool m_checkForBrowserSideNavigation;
277 double m_uiStartTime; 283 double m_uiStartTime;
278 bool m_isExternalRequest; 284 bool m_isExternalRequest;
279 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; 285 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy;
280 286
281 mutable CacheControlHeader m_cacheControlHeaderCache; 287 mutable CacheControlHeader m_cacheControlHeaderCache;
282 288
283 static double s_defaultTimeoutInterval; 289 static double s_defaultTimeoutInterval;
284 290
285 RedirectStatus m_redirectStatus; 291 RedirectStatus m_redirectStatus;
292
293 KURL m_initialUrl;
294 double m_navigationStart = 0;
286 }; 295 };
287 296
288 struct CrossThreadResourceRequestData { 297 struct CrossThreadResourceRequestData {
289 WTF_MAKE_NONCOPYABLE(CrossThreadResourceRequestData); USING_FAST_MALLOC(Cros sThreadResourceRequestData); 298 WTF_MAKE_NONCOPYABLE(CrossThreadResourceRequestData); USING_FAST_MALLOC(Cros sThreadResourceRequestData);
290 public: 299 public:
291 CrossThreadResourceRequestData() { } 300 CrossThreadResourceRequestData() { }
292 KURL m_url; 301 KURL m_url;
293 302
294 WebCachePolicy m_cachePolicy; 303 WebCachePolicy m_cachePolicy;
295 double m_timeoutInterval; 304 double m_timeoutInterval;
(...skipping 27 matching lines...) Expand all
323 bool m_checkForBrowserSideNavigation; 332 bool m_checkForBrowserSideNavigation;
324 double m_uiStartTime; 333 double m_uiStartTime;
325 bool m_isExternalRequest; 334 bool m_isExternalRequest;
326 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; 335 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy;
327 ResourceRequest::RedirectStatus m_redirectStatus; 336 ResourceRequest::RedirectStatus m_redirectStatus;
328 }; 337 };
329 338
330 } // namespace blink 339 } // namespace blink
331 340
332 #endif // ResourceRequest_h 341 #endif // ResourceRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698