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

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

Issue 1756953002: Stop dispatching notifyFinished for each part in a multipart response (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@multipart-cleanup-2
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ImageResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/ImageResource.h
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.h b/third_party/WebKit/Source/core/fetch/ImageResource.h
index 8baf98c6941a7a27c0017233b7d3eb11e27bd570..f5c4d9a5629bf3c182ecde939cd04d0576ab6351 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.h
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.h
@@ -118,7 +118,7 @@ public:
void changedInRect(const blink::Image*, const IntRect&) override;
// MultipartImageResourceParser::Client
- void onePartInMultipartReceived(const ResourceResponse&, bool isFirstPart) final;
+ void onePartInMultipartReceived(const ResourceResponse&) final;
void multipartDataReceived(const char*, size_t) final;
DECLARE_VIRTUAL_TRACE();
@@ -132,6 +132,12 @@ private:
explicit ImageResource(blink::Image*);
ImageResource(const ResourceRequest&, blink::Image*);
+ enum class MultipartParsingState : uint8_t {
+ WaitingForFirstPart,
+ ParsingFirstPart,
+ FinishedParsingFirstPart,
+ };
+
class ImageResourceFactory : public ResourceFactory {
public:
ImageResourceFactory()
@@ -157,6 +163,7 @@ private:
PersistentWillBeMember<MultipartImageResourceParser> m_multipartParser;
RefPtr<blink::Image> m_image;
+ MultipartParsingState m_multipartParsingState = MultipartParsingState::WaitingForFirstPart;
bool m_hasDevicePixelRatioHeaderValue;
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ImageResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698