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

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

Issue 2301323003: Add deprecation warning for script fetches with invalid types (Closed)
Patch Set: Update deprecation message with chromestatus entry Created 4 years, 3 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
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 #ifndef PreloadRequest_h 5 #ifndef PreloadRequest_h
6 #define PreloadRequest_h 6 #define PreloadRequest_h
7 7
8 #include "core/fetch/ClientHintsPreferences.h" 8 #include "core/fetch/ClientHintsPreferences.h"
9 #include "core/fetch/FetchRequest.h" 9 #include "core/fetch/FetchRequest.h"
10 #include "core/fetch/IntegrityMetadata.h" 10 #include "core/fetch/IntegrityMetadata.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; } 61 ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; }
62 void setIntegrityMetadata(const IntegrityMetadataSet& metadataSet) 62 void setIntegrityMetadata(const IntegrityMetadataSet& metadataSet)
63 { 63 {
64 m_integrityMetadata = metadataSet; 64 m_integrityMetadata = metadataSet;
65 } 65 }
66 const IntegrityMetadataSet& integrityMetadata() const 66 const IntegrityMetadataSet& integrityMetadata() const
67 { 67 {
68 return m_integrityMetadata; 68 return m_integrityMetadata;
69 } 69 }
70 70
71 void setScriptHasInvalidTypeOrLanguage() { m_hasInvalidTypeOrLanguage = true ; }
72 bool scriptHasInvalidTypeOrLanguage() { return m_hasInvalidTypeOrLanguage; }
73
71 private: 74 private:
72 PreloadRequest(const String& initiatorName, 75 PreloadRequest(const String& initiatorName,
73 const TextPosition& initiatorPosition, 76 const TextPosition& initiatorPosition,
74 const String& resourceURL, 77 const String& resourceURL,
75 const KURL& baseURL, 78 const KURL& baseURL,
76 Resource::Type resourceType, 79 Resource::Type resourceType,
77 const FetchRequest::ResourceWidth& resourceWidth, 80 const FetchRequest::ResourceWidth& resourceWidth,
78 const ClientHintsPreferences& clientHintsPreferences, 81 const ClientHintsPreferences& clientHintsPreferences,
79 RequestType requestType, 82 RequestType requestType,
80 const ReferrerPolicy referrerPolicy) 83 const ReferrerPolicy referrerPolicy)
(...skipping 22 matching lines...) Expand all
103 Resource::Type m_resourceType; 106 Resource::Type m_resourceType;
104 CrossOriginAttributeValue m_crossOrigin; 107 CrossOriginAttributeValue m_crossOrigin;
105 String m_nonce; 108 String m_nonce;
106 double m_discoveryTime; 109 double m_discoveryTime;
107 FetchRequest::DeferOption m_defer; 110 FetchRequest::DeferOption m_defer;
108 FetchRequest::ResourceWidth m_resourceWidth; 111 FetchRequest::ResourceWidth m_resourceWidth;
109 ClientHintsPreferences m_clientHintsPreferences; 112 ClientHintsPreferences m_clientHintsPreferences;
110 RequestType m_requestType; 113 RequestType m_requestType;
111 ReferrerPolicy m_referrerPolicy; 114 ReferrerPolicy m_referrerPolicy;
112 IntegrityMetadataSet m_integrityMetadata; 115 IntegrityMetadataSet m_integrityMetadata;
116
117 // Used for deprecation warnings.
118 bool m_hasInvalidTypeOrLanguage = false;
113 }; 119 };
114 120
115 typedef Vector<std::unique_ptr<PreloadRequest>> PreloadRequestStream; 121 typedef Vector<std::unique_ptr<PreloadRequest>> PreloadRequestStream;
116 122
117 } // namespace blink 123 } // namespace blink
118 124
119 #endif 125 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698