| Index: Source/core/fetch/Resource.h
|
| diff --git a/Source/core/fetch/Resource.h b/Source/core/fetch/Resource.h
|
| index 58340fd9b3733b006e2141bfbccce67610c7ac88..85465bd19c3a0b4a2dc6fa6c90cb3e45db24b5ec 100644
|
| --- a/Source/core/fetch/Resource.h
|
| +++ b/Source/core/fetch/Resource.h
|
| @@ -85,6 +85,7 @@ public:
|
| DecodeError
|
| };
|
|
|
| + // Exposed for testing.
|
| Resource(const ResourceRequest&, Type);
|
| #if ENABLE(OILPAN)
|
| virtual ~Resource();
|
| @@ -104,6 +105,7 @@ public:
|
| virtual String encoding() const { return String(); }
|
| virtual void appendData(const char*, unsigned);
|
| virtual void error(Resource::Status);
|
| + virtual void setCORSFailed() { }
|
|
|
| void setNeedsSynchronousCacheHit(bool needsSynchronousCacheHit) { m_needsSynchronousCacheHit = needsSynchronousCacheHit; }
|
|
|
| @@ -416,6 +418,17 @@ private:
|
| static unsigned s_instanceCount;
|
| };
|
|
|
| +class ResourceFactory {
|
| +public:
|
| + virtual Resource* create(const ResourceRequest&, const String&) const = 0;
|
| + Resource::Type type() const { return m_type; }
|
| +
|
| +protected:
|
| + ResourceFactory(Resource::Type type) : m_type(type) { }
|
| +
|
| + Resource::Type m_type;
|
| +};
|
| +
|
| #if !LOG_DISABLED
|
| // Intended to be used in LOG statements.
|
| const char* ResourceTypeName(Resource::Type);
|
|
|