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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/FetchRequest.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/loader/fetch/FetchRequest.h
diff --git a/third_party/WebKit/Source/platform/loader/fetch/FetchRequest.h b/third_party/WebKit/Source/platform/loader/fetch/FetchRequest.h
index 7389bfcb677b91a21c62c22f9c424bc48ce247d9..f7e31a2aab732afa4ab01df2225638997ce3f21d 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/FetchRequest.h
+++ b/third_party/WebKit/Source/platform/loader/fetch/FetchRequest.h
@@ -56,10 +56,7 @@ class PLATFORM_EXPORT FetchRequest {
AllowPlaceholder, // The image is allowed to be a placeholder.
};
// TODO(toyoshim): Consider to define an enum for preload options, and use it
- // instead of bool in this class, FrameFetchContext, and so on. If it is
- // reasonable, we try merging m_speculativePreload and m_linkPreload into one
- // enum type. See https://crbug.com/675883.
-
+ // instead of bool in this class, FrameFetchContext, and so on.
struct ResourceWidth {
DISALLOW_NEW();
float width;
@@ -100,13 +97,16 @@ class PLATFORM_EXPORT FetchRequest {
return m_clientHintPreferences;
}
- bool isSpeculativePreload() const { return m_speculativePreload; }
- void setSpeculativePreload(bool speculativePreload, double discoveryTime = 0);
+ bool isSpeculativePreload() const {
+ return m_resourceRequest.isSpeculativePreload();
+ }
- double preloadDiscoveryTime() { return m_preloadDiscoveryTime; }
+ bool isLinkPreload() const { return m_resourceRequest.isLinkPreload(); }
- bool isLinkPreload() const { return m_linkPreload; }
- void setLinkPreload(bool isLinkPreload) { m_linkPreload = isLinkPreload; }
+ // TODO(toyoshim): do not use this method, to be removed.
tyoshino (SeeGerritForStatus) 2017/03/27 05:41:08 let's put the warning outside of the TODO as it's
+ void setLinkPreload(bool isLinkPreload) {
+ m_resourceRequest.setLinkPreload(isLinkPreload);
+ }
void setContentSecurityCheck(
ContentSecurityPolicyDisposition contentSecurityPolicyOption) {
@@ -156,9 +156,6 @@ class PLATFORM_EXPORT FetchRequest {
ResourceRequest m_resourceRequest;
String m_charset;
ResourceLoaderOptions m_options;
- bool m_speculativePreload;
- bool m_linkPreload;
- double m_preloadDiscoveryTime;
DeferOption m_defer;
OriginRestriction m_originRestriction;
ResourceWidth m_resourceWidth;

Powered by Google App Engine
This is Rietveld 408576698