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

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

Issue 2724673002: [WIP] Introduce ScriptResourceData
Patch Set: Compile fix Created 3 years, 4 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 3fa422f4c417ba2d4e72b8f00ede34403ca29d85..994822ea04461235dbd93d053d6d4b48aa573284 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"
#include "platform/loader/fetch/ResourceLoaderOptions.h"
@@ -70,21 +70,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;
-
- private:
class ScriptResourceFactory : public ResourceFactory {
public:
ScriptResourceFactory()
@@ -103,7 +102,7 @@ class CORE_EXPORT ScriptResource final : public TextResource {
const ResourceLoaderOptions&,
const TextResourceDecoderOptions&);
- AtomicString source_text_;
+ Member<ScriptResourceData> script_data_;
};
DEFINE_RESOURCE_TYPE_CASTS(Script);

Powered by Google App Engine
This is Rietveld 408576698