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

Unified Diff: Source/core/html/parser/PreloadRequest.h

Issue 1121263002: Add Accept-CH meta http-equiv support to the preloader. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase after AcceptClientHints move Created 5 years, 7 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: Source/core/html/parser/PreloadRequest.h
diff --git a/Source/core/html/parser/PreloadRequest.h b/Source/core/html/parser/PreloadRequest.h
index 738635c272868f07587a97235677ba75c9689bf2..7909dea170ab4893eb8de9189e2ae1ed79c00617 100644
--- a/Source/core/html/parser/PreloadRequest.h
+++ b/Source/core/html/parser/PreloadRequest.h
@@ -5,6 +5,7 @@
#ifndef PreloadRequest_h
#define PreloadRequest_h
+#include "core/fetch/ClientHintsPreferences.h"
#include "core/fetch/FetchRequest.h"
#include "core/fetch/Resource.h"
#include "wtf/text/TextPosition.h"
@@ -15,9 +16,9 @@ class Document;
class PreloadRequest {
public:
- static PassOwnPtr<PreloadRequest> create(const String& initiatorName, const TextPosition& initiatorPosition, const String& resourceURL, const KURL& baseURL, Resource::Type resourceType, const FetchRequest::ResourceWidth& resourceWidth = FetchRequest::ResourceWidth())
+ static PassOwnPtr<PreloadRequest> create(const String& initiatorName, const TextPosition& initiatorPosition, const String& resourceURL, const KURL& baseURL, Resource::Type resourceType, const FetchRequest::ResourceWidth& resourceWidth = FetchRequest::ResourceWidth(), const ClientHintsPreferences& clientHintsPreferences = ClientHintsPreferences())
{
- return adoptPtr(new PreloadRequest(initiatorName, initiatorPosition, resourceURL, baseURL, resourceType, resourceWidth));
+ return adoptPtr(new PreloadRequest(initiatorName, initiatorPosition, resourceURL, baseURL, resourceType, resourceWidth, clientHintsPreferences));
}
bool isSafeToSendToAnotherThread() const;
@@ -41,7 +42,8 @@ public:
const String& baseURL() const { return m_baseURL.string(); }
private:
- PreloadRequest(const String& initiatorName, const TextPosition& initiatorPosition, const String& resourceURL, const KURL& baseURL, Resource::Type resourceType, const FetchRequest::ResourceWidth& resourceWidth)
+ PreloadRequest(const String& initiatorName, const TextPosition& initiatorPosition, const String& resourceURL, const KURL& baseURL, Resource::Type resourceType,
+ const FetchRequest::ResourceWidth& resourceWidth, const ClientHintsPreferences& clientHintsPreferences)
Mike West 2015/05/05 15:22:36 Nit: This is somewhat strange line-breaking.
: m_initiatorName(initiatorName)
, m_initiatorPosition(initiatorPosition)
, m_resourceURL(resourceURL.isolatedCopy())
@@ -52,6 +54,7 @@ private:
, m_discoveryTime(monotonicallyIncreasingTime())
, m_defer(FetchRequest::NoDefer)
, m_resourceWidth(resourceWidth)
+ , m_clientHintsPreferences(clientHintsPreferences)
{
}
@@ -68,6 +71,7 @@ private:
double m_discoveryTime;
FetchRequest::DeferOption m_defer;
FetchRequest::ResourceWidth m_resourceWidth;
+ ClientHintsPreferences m_clientHintsPreferences;
};
typedef Vector<OwnPtr<PreloadRequest>> PreloadRequestStream;

Powered by Google App Engine
This is Rietveld 408576698