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

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

Issue 1235563004: Apply meta tag referrer policy for preloaded requests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: style fix Created 5 years, 5 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
« no previous file with comments | « Source/core/html/parser/HTMLPreloadScanner.cpp ('k') | Source/core/html/parser/PreloadRequest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/PreloadRequest.h
diff --git a/Source/core/html/parser/PreloadRequest.h b/Source/core/html/parser/PreloadRequest.h
index 9e06fcd89d1146a36effc95b9d259bd98a59a209..49b6afa0f1e99c8cfed6910e372f8dc2c5d5eb35 100644
--- a/Source/core/html/parser/PreloadRequest.h
+++ b/Source/core/html/parser/PreloadRequest.h
@@ -8,6 +8,7 @@
#include "core/fetch/ClientHintsPreferences.h"
#include "core/fetch/FetchRequest.h"
#include "core/fetch/Resource.h"
+#include "platform/weborigin/SecurityPolicy.h"
#include "wtf/text/TextPosition.h"
namespace blink {
@@ -18,9 +19,9 @@ class PreloadRequest {
public:
enum RequestType { RequestTypePreload, RequestTypePreconnect };
- 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(), RequestType requestType = RequestTypePreload)
+ static PassOwnPtr<PreloadRequest> create(const String& initiatorName, const TextPosition& initiatorPosition, const String& resourceURL, const KURL& baseURL, Resource::Type resourceType, const ReferrerPolicy referrerPolicy, const FetchRequest::ResourceWidth& resourceWidth = FetchRequest::ResourceWidth(), const ClientHintsPreferences& clientHintsPreferences = ClientHintsPreferences(), RequestType requestType = RequestTypePreload)
{
- return adoptPtr(new PreloadRequest(initiatorName, initiatorPosition, resourceURL, baseURL, resourceType, resourceWidth, clientHintsPreferences, requestType));
+ return adoptPtr(new PreloadRequest(initiatorName, initiatorPosition, resourceURL, baseURL, resourceType, resourceWidth, clientHintsPreferences, requestType, referrerPolicy));
}
bool isSafeToSendToAnotherThread() const;
@@ -55,7 +56,8 @@ private:
Resource::Type resourceType,
const FetchRequest::ResourceWidth& resourceWidth,
const ClientHintsPreferences& clientHintsPreferences,
- RequestType requestType)
+ RequestType requestType,
+ const ReferrerPolicy referrerPolicy)
: m_initiatorName(initiatorName)
, m_initiatorPosition(initiatorPosition)
, m_resourceURL(resourceURL.isolatedCopy())
@@ -68,6 +70,7 @@ private:
, m_resourceWidth(resourceWidth)
, m_clientHintsPreferences(clientHintsPreferences)
, m_requestType(requestType)
+ , m_referrerPolicy(referrerPolicy)
{
}
@@ -86,6 +89,7 @@ private:
FetchRequest::ResourceWidth m_resourceWidth;
ClientHintsPreferences m_clientHintsPreferences;
RequestType m_requestType;
+ ReferrerPolicy m_referrerPolicy;
};
typedef Vector<OwnPtr<PreloadRequest>> PreloadRequestStream;
« no previous file with comments | « Source/core/html/parser/HTMLPreloadScanner.cpp ('k') | Source/core/html/parser/PreloadRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698