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

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

Issue 2148723002: Teach the preload scanner about the 'nonce' attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: third_party/WebKit/Source/core/html/parser/PreloadRequest.h
diff --git a/third_party/WebKit/Source/core/html/parser/PreloadRequest.h b/third_party/WebKit/Source/core/html/parser/PreloadRequest.h
index 9154fff2d31c5d8b9b0f90f1b10898bc017d8944..c4ac3a38dfafd53c5a0954a3a25a42a79690e07a 100644
--- a/third_party/WebKit/Source/core/html/parser/PreloadRequest.h
+++ b/third_party/WebKit/Source/core/html/parser/PreloadRequest.h
@@ -46,6 +46,10 @@ public:
{
return m_crossOrigin;
}
+
+ void setNonce(const String& nonce) { m_nonce = nonce.isolatedCopy(); }
+ const String& nonce() const { return m_nonce; }
+
Resource::Type resourceType() const { return m_resourceType; }
const String& resourceURL() const { return m_resourceURL; }
@@ -97,6 +101,7 @@ private:
String m_charset;
Resource::Type m_resourceType;
CrossOriginAttributeValue m_crossOrigin;
+ String m_nonce;
double m_discoveryTime;
FetchRequest::DeferOption m_defer;
FetchRequest::ResourceWidth m_resourceWidth;

Powered by Google App Engine
This is Rietveld 408576698