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

Unified Diff: third_party/WebKit/Source/core/fetch/Resource.h

Issue 1738553002: [ABANDONED] Move multipart/x-mixed-replace related code to ImageResource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@multipart-cleanup-2
Patch Set: Created 4 years, 10 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/fetch/Resource.h
diff --git a/third_party/WebKit/Source/core/fetch/Resource.h b/third_party/WebKit/Source/core/fetch/Resource.h
index fbf2a106efe8d0d90c19db33164a16c1c2cdc41b..1bea4ff2585c02ea93c8989744f9e5054adca8d8 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.h
+++ b/third_party/WebKit/Source/core/fetch/Resource.h
@@ -25,7 +25,6 @@
#include "core/CoreExport.h"
#include "core/fetch/CachedMetadataHandler.h"
-#include "core/fetch/MultipartImageResourceParser.h"
#include "core/fetch/ResourceLoaderOptions.h"
#include "platform/Timer.h"
#include "platform/network/ResourceError.h"
@@ -60,10 +59,9 @@ class SharedBuffer;
// A resource that is held in the cache. Classes who want to use this object should derive
// from ResourceClient, to get the function calls in case the requested data has arrived.
// This class also does the actual communication with the loader to obtain the resource from the network.
-class CORE_EXPORT Resource : public RefCountedWillBeGarbageCollectedFinalized<Resource>, public MultipartImageResourceParser::Client {
+class CORE_EXPORT Resource : public RefCountedWillBeGarbageCollectedFinalized<Resource> {
WTF_MAKE_NONCOPYABLE(Resource);
USING_FAST_MALLOC_WITH_TYPE_NAME_WILL_BE_REMOVED(blink::Resource);
- WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Resource);
friend class InspectorResource;
public:
@@ -106,7 +104,7 @@ public:
virtual void setEncoding(const String&) { }
virtual String encoding() const { return String(); }
- void appendData(const char*, size_t);
+ virtual void appendData(const char*, size_t);
virtual void error(Resource::Status);
virtual void setCORSFailed() { }
@@ -177,7 +175,7 @@ public:
// Computes the status of an object after loading.
// Updates the expire date on the cache entry file
void setLoadFinishTime(double finishTime) { m_loadFinishTime = finishTime; }
- void finish();
+ virtual void finish();
// FIXME: Remove the stringless variant once all the callsites' error messages are updated.
bool passesAccessControlCheck(SecurityOrigin*) const;
@@ -262,26 +260,18 @@ public:
// TODO(japhet): Remove once oilpan ships, it doesn't need the WeakPtr.
WeakPtrWillBeRawPtr<Resource> asWeakPtr();
- bool isMultipartImage() const;
-
#ifdef ENABLE_RESOURCE_IS_DELETED_CHECK
void assertAlive() const { RELEASE_ASSERT(!m_deleted); }
#else
void assertAlive() const { }
#endif
- // MultipartImageResourceParser::Client
- void onePartInMultipartReceived(const ResourceResponse&) final;
- void multipartDataReceived(const char*, size_t) final;
-
protected:
Resource(const ResourceRequest&, Type);
virtual void checkNotify();
- virtual void finishOnePart();
virtual void destroyDecodedDataForFailedRevalidation() { }
- virtual void appendDataInternal(const char*, size_t);
void setEncodedSize(size_t);
void setDecodedSize(size_t);
@@ -364,7 +354,6 @@ private:
RefPtr<CachedMetadata> m_cachedMetadata;
OwnPtrWillBeMember<CacheHandler> m_cacheHandler;
- PersistentWillBeMember<MultipartImageResourceParser> m_multipartParser;
ResourceError m_error;
« no previous file with comments | « third_party/WebKit/Source/core/fetch/RawResource.cpp ('k') | third_party/WebKit/Source/core/fetch/Resource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698