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

Side by Side Diff: third_party/WebKit/Source/core/fetch/ScriptResource.h

Issue 2397423003: Revert of Cache SubResourceIntegrity checks at Resource (Closed)
Patch Set: Created 4 years, 2 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 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org>
4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 void onMemoryDump(WebMemoryDumpLevelOfDetail, 69 void onMemoryDump(WebMemoryDumpLevelOfDetail,
70 WebProcessMemoryDump*) const override; 70 WebProcessMemoryDump*) const override;
71 71
72 void destroyDecodedDataForFailedRevalidation() override; 72 void destroyDecodedDataForFailedRevalidation() override;
73 73
74 const String& script(); 74 const String& script();
75 75
76 bool mimeTypeAllowedByNosniff() const; 76 bool mimeTypeAllowedByNosniff() const;
77 77
78 void setIntegrityMetadata(const IntegrityMetadataSet& metadata) {
79 m_integrityMetadata = metadata;
80 }
81 const IntegrityMetadataSet& integrityMetadata() const {
82 return m_integrityMetadata;
83 }
84 // The argument must never be |NotChecked|.
85 void setIntegrityDisposition(ScriptIntegrityDisposition);
86 ScriptIntegrityDisposition integrityDisposition() {
87 return m_integrityDisposition;
88 }
89 bool mustRefetchDueToIntegrityMetadata(const FetchRequest&) const override;
90
78 private: 91 private:
79 class ScriptResourceFactory : public ResourceFactory { 92 class ScriptResourceFactory : public ResourceFactory {
80 public: 93 public:
81 ScriptResourceFactory() : ResourceFactory(Resource::Script) {} 94 ScriptResourceFactory() : ResourceFactory(Resource::Script) {}
82 95
83 Resource* create(const ResourceRequest& request, 96 Resource* create(const ResourceRequest& request,
84 const ResourceLoaderOptions& options, 97 const ResourceLoaderOptions& options,
85 const String& charset) const override { 98 const String& charset) const override {
86 return new ScriptResource(request, options, charset); 99 return new ScriptResource(request, options, charset);
87 } 100 }
88 }; 101 };
89 102
90 ScriptResource(const ResourceRequest&, 103 ScriptResource(const ResourceRequest&,
91 const ResourceLoaderOptions&, 104 const ResourceLoaderOptions&,
92 const String& charset); 105 const String& charset);
93 106
107 ScriptIntegrityDisposition m_integrityDisposition;
108 IntegrityMetadataSet m_integrityMetadata;
109
94 AtomicString m_script; 110 AtomicString m_script;
95 }; 111 };
96 112
97 DEFINE_RESOURCE_TYPE_CASTS(Script); 113 DEFINE_RESOURCE_TYPE_CASTS(Script);
98 114
99 } // namespace blink 115 } // namespace blink
100 116
101 #endif 117 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | third_party/WebKit/Source/core/fetch/ScriptResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698