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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/PreloadRequest.cpp

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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/PreloadRequest.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/html/parser/PreloadRequest.h" 5 #include "core/html/parser/PreloadRequest.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/fetch/FetchInitiatorInfo.h" 8 #include "core/fetch/FetchInitiatorInfo.h"
9 #include "core/fetch/ResourceFetcher.h" 9 #include "core/fetch/ResourceFetcher.h"
10 #include "platform/CrossOriginAttributeValue.h" 10 #include "platform/CrossOriginAttributeValue.h"
(...skipping 29 matching lines...) Expand all
40 if (m_resourceType == Resource::ImportResource) { 40 if (m_resourceType == Resource::ImportResource) {
41 SecurityOrigin* securityOrigin = document->contextDocument()->getSecurit yOrigin(); 41 SecurityOrigin* securityOrigin = document->contextDocument()->getSecurit yOrigin();
42 request.setCrossOriginAccessControl(securityOrigin, CrossOriginAttribute Anonymous); 42 request.setCrossOriginAccessControl(securityOrigin, CrossOriginAttribute Anonymous);
43 } 43 }
44 if (m_crossOrigin != CrossOriginAttributeNotSet) 44 if (m_crossOrigin != CrossOriginAttributeNotSet)
45 request.setCrossOriginAccessControl(document->getSecurityOrigin(), m_cro ssOrigin); 45 request.setCrossOriginAccessControl(document->getSecurityOrigin(), m_cro ssOrigin);
46 request.setDefer(m_defer); 46 request.setDefer(m_defer);
47 request.setResourceWidth(m_resourceWidth); 47 request.setResourceWidth(m_resourceWidth);
48 request.clientHintsPreferences().updateFrom(m_clientHintsPreferences); 48 request.clientHintsPreferences().updateFrom(m_clientHintsPreferences);
49 request.setIntegrityMetadata(m_integrityMetadata); 49 request.setIntegrityMetadata(m_integrityMetadata);
50 request.setContentSecurityPolicyNonce(m_nonce);
50 51
51 if (m_requestType == RequestTypeLinkRelPreload) 52 if (m_requestType == RequestTypeLinkRelPreload)
52 request.setLinkPreload(true); 53 request.setLinkPreload(true);
53 return request; 54 return request;
54 } 55 }
55 56
56 } // namespace blink 57 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/PreloadRequest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698