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

Unified Diff: third_party/WebKit/Source/core/loader/resource/ScriptResource.h

Issue 2724673002: [WIP] Introduce ScriptResourceData
Patch Set: Fix Created 3 years, 8 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/loader/resource/ScriptResource.h
diff --git a/third_party/WebKit/Source/core/loader/resource/ScriptResource.h b/third_party/WebKit/Source/core/loader/resource/ScriptResource.h
index 4cea90a41c1a434636151e117ac53a83e32b53b2..f839a58c8215e1ff3671c64f12845357182978a9 100644
--- a/third_party/WebKit/Source/core/loader/resource/ScriptResource.h
+++ b/third_party/WebKit/Source/core/loader/resource/ScriptResource.h
@@ -27,8 +27,8 @@
#define ScriptResource_h
#include "core/CoreExport.h"
+#include "core/loader/resource/ScriptResourceData.h"
#include "core/loader/resource/TextResource.h"
-#include "platform/loader/fetch/AccessControlStatus.h"
#include "platform/loader/fetch/IntegrityMetadata.h"
#include "platform/loader/fetch/ResourceClient.h"
@@ -64,21 +64,20 @@ class CORE_EXPORT ScriptResource final : public TextResource {
~ScriptResource() override;
- void DidAddClient(ResourceClient*) override;
+ DECLARE_VIRTUAL_TRACE();
+
+ const ScriptResourceData* ResourceData();
+
void AppendData(const char*, size_t) override;
+ private:
+ void DidAddClient(ResourceClient*) override;
+
void OnMemoryDump(WebMemoryDumpLevelOfDetail,
WebProcessMemoryDump*) const override;
void DestroyDecodedDataForFailedRevalidation() override;
- const String& SourceText();
-
- static bool MimeTypeAllowedByNosniff(const ResourceResponse&);
-
- AccessControlStatus CalculateAccessControlStatus(const SecurityOrigin*) const;
-
- private:
class ScriptResourceFactory : public ResourceFactory {
public:
ScriptResourceFactory() : ResourceFactory(Resource::kScript) {}
@@ -94,7 +93,7 @@ class CORE_EXPORT ScriptResource final : public TextResource {
const ResourceLoaderOptions&,
const String& charset);
- AtomicString source_text_;
+ Member<ScriptResourceData> script_data_;
};
DEFINE_RESOURCE_TYPE_CASTS(Script);

Powered by Google App Engine
This is Rietveld 408576698