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

Unified Diff: third_party/WebKit/Source/platform/network/ResourceRequest.h

Issue 2751043002: DevTools: expose linkPreload bit on the network request. (Closed)
Patch Set: todo added as per request Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/network/ResourceRequest.h
diff --git a/third_party/WebKit/Source/platform/network/ResourceRequest.h b/third_party/WebKit/Source/platform/network/ResourceRequest.h
index 8c1f927c86c72204d65780288e5e13f49cfbe8c1..481f552eb00d2c8bb6f7379e0efd36ecb4e198fc 100644
--- a/third_party/WebKit/Source/platform/network/ResourceRequest.h
+++ b/third_party/WebKit/Source/platform/network/ResourceRequest.h
@@ -316,6 +316,16 @@ class PLATFORM_EXPORT ResourceRequest final {
}
bool isSameDocumentNavigation() const { return m_isSameDocumentNavigation; }
+ // TODO(toyoshim): If it is reasonable, we try merging m_speculativePreload
+ // and m_linkPreload into one enum type. See https://crbug.com/675883.
+ bool isLinkPreload() const { return m_linkPreload; }
Nate Chapin 2017/03/16 17:15:00 The standard I typically use for deciding whether
+ void setLinkPreload(bool isLinkPreload) { m_linkPreload = isLinkPreload; }
+
+ bool isSpeculativePreload() const { return m_speculativePreload; }
+ void setSpeculativePreload(bool speculativePreload, double discoveryTime = 0);
+
+ double preloadDiscoveryTime() const { return m_preloadDiscoveryTime; }
+
private:
const CacheControlHeader& cacheControlHeader() const;
@@ -357,6 +367,10 @@ class PLATFORM_EXPORT ResourceRequest final {
double m_uiStartTime;
bool m_isExternalRequest;
bool m_isSameDocumentNavigation;
+ bool m_linkPreload;
+ bool m_speculativePreload;
+ double m_preloadDiscoveryTime;
+
InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy;
mutable CacheControlHeader m_cacheControlHeaderCache;

Powered by Google App Engine
This is Rietveld 408576698