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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceLoader.cpp

Issue 1710733002: Move multipart resource handling to core/fetch (2/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@multipart-cleanup
Patch Set: rebase 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/ResourceLoader.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp b/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
index d53920a74f301b0c897fa9635f12c6439c71031b..99b65f97b91dff470c2fca99fb45da1444d71333 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
@@ -69,7 +69,6 @@ ResourceLoader::ResourceLoader(ResourceFetcher* fetcher, Resource* resource, con
: m_fetcher(fetcher)
, m_notifiedLoadComplete(false)
, m_defersLoading(fetcher->defersLoading())
- , m_loadingMultipartContent(false)
, m_options(options)
, m_resource(resource)
, m_state(Initialized)
@@ -363,23 +362,6 @@ void ResourceLoader::didReceiveResponse(WebURLLoader*, const WebURLResponse& res
if (m_state == Terminated)
return;
- if (response.toResourceResponse().isMultipart()) {
- // We only support multipart for images, though the image may be loaded
- // as a main resource that we end up displaying through an ImageDocument.
- if (!m_resource->isImage() && m_resource->type() != Resource::MainResource) {
- cancel();
- return;
- }
- m_loadingMultipartContent = true;
- } else if (isMultipartPayload) {
- // Since a subresource loader does not load multipart sections progressively, data was delivered to the loader all at once.
- // After the first multipart section is complete, signal to delegates that this load is "finished"
- m_fetcher->subresourceLoaderFinishedLoadingOnePart(this);
- didFinishLoadingOnePart(0, WebURLLoaderClient::kUnknownEncodedDataLength);
- }
- if (m_state == Terminated)
- return;
-
if (m_resource->response().httpStatusCode() < 400 || m_resource->shouldIgnoreHTTPStatusCodeErrors())
return;
m_state = Finishing;

Powered by Google App Engine
This is Rietveld 408576698