| Index: third_party/WebKit/Source/core/fetch/Resource.cpp
|
| diff --git a/third_party/WebKit/Source/core/fetch/Resource.cpp b/third_party/WebKit/Source/core/fetch/Resource.cpp
|
| index 2ee9c2e1d4dccc96cffa1c882c164075ddcd2bee..5ee37c948f08ad9e2589748e0ce3039b9653e985 100644
|
| --- a/third_party/WebKit/Source/core/fetch/Resource.cpp
|
| +++ b/third_party/WebKit/Source/core/fetch/Resource.cpp
|
| @@ -205,8 +205,6 @@ DEFINE_TRACE(Resource)
|
| #if ENABLE(OILPAN)
|
| visitor->trace(m_cacheHandler);
|
| #endif
|
| - visitor->trace(m_multipartParser);
|
| - MultipartImageResourceParser::Client::trace(visitor);
|
| }
|
|
|
| void Resource::load(ResourceFetcher* fetcher, const ResourceLoaderOptions& options)
|
| @@ -250,15 +248,6 @@ void Resource::checkNotify()
|
| void Resource::appendData(const char* data, size_t length)
|
| {
|
| TRACE_EVENT0("blink", "Resource::appendData");
|
| - if (isMultipartImage()) {
|
| - m_multipartParser->appendData(data, length);
|
| - return;
|
| - }
|
| - appendDataInternal(data, length);
|
| -}
|
| -
|
| -void Resource::appendDataInternal(const char* data, size_t length)
|
| -{
|
| ASSERT(m_revalidatingRequest.isNull());
|
| ASSERT(!errorOccurred());
|
| if (m_options.dataBufferingPolicy == DoNotBufferData)
|
| @@ -299,9 +288,6 @@ void Resource::markClientsFinished()
|
|
|
| void Resource::error(Resource::Status status)
|
| {
|
| - if (m_multipartParser)
|
| - m_multipartParser->cancel();
|
| -
|
| if (!m_revalidatingRequest.isNull())
|
| m_revalidatingRequest = ResourceRequest();
|
|
|
| @@ -317,20 +303,11 @@ void Resource::error(Resource::Status status)
|
| markClientsFinished();
|
| }
|
|
|
| -void Resource::finishOnePart()
|
| -{
|
| - setLoading(false);
|
| - checkNotify();
|
| -}
|
| -
|
| void Resource::finish()
|
| {
|
| ASSERT(m_revalidatingRequest.isNull());
|
| - ASSERT(!errorOccurred());
|
| - if (m_multipartParser)
|
| - m_multipartParser->finish();
|
| -
|
| - finishOnePart();
|
| + setLoading(false);
|
| + checkNotify();
|
| markClientsFinished();
|
| if (!errorOccurred())
|
| m_status = Cached;
|
| @@ -479,9 +456,6 @@ void Resource::responseReceived(const ResourceResponse& response, PassOwnPtr<Web
|
| }
|
| revalidationFailed();
|
| }
|
| - // If there's no boundary, just handle the request normally.
|
| - if (response.isMultipart() && !response.multipartBoundary().isEmpty() && (m_type == Resource::Image || m_type == Resource::MainResource) && !m_multipartParser)
|
| - m_multipartParser = new MultipartImageResourceParser(response, response.multipartBoundary(), this);
|
| setResponse(response);
|
| String encoding = response.textEncodingName();
|
| if (!encoding.isNull())
|
| @@ -541,25 +515,6 @@ WeakPtrWillBeRawPtr<Resource> Resource::asWeakPtr()
|
| #endif
|
| }
|
|
|
| -bool Resource::isMultipartImage() const
|
| -{
|
| - return m_multipartParser;
|
| -}
|
| -
|
| -void Resource::onePartInMultipartReceived(const ResourceResponse& response)
|
| -{
|
| - ASSERT(isMultipartImage());
|
| - responseReceived(response, nullptr);
|
| - if (response.isMultipartPayload() && m_loader)
|
| - m_loader->didFinishLoadingOnePart(0, WebURLLoaderClient::kUnknownEncodedDataLength);
|
| -}
|
| -
|
| -void Resource::multipartDataReceived(const char* bytes, size_t size)
|
| -{
|
| - ASSERT(isMultipartImage());
|
| - appendDataInternal(bytes, size);
|
| -}
|
| -
|
| String Resource::reasonNotDeletable() const
|
| {
|
| StringBuilder builder;
|
| @@ -713,8 +668,6 @@ void Resource::allClientsRemoved()
|
| else if (!m_cancelTimer.isActive())
|
| m_cancelTimer.startOneShot(0, BLINK_FROM_HERE);
|
|
|
| - if (m_multipartParser)
|
| - m_multipartParser->cancel();
|
| unlock();
|
| }
|
|
|
|
|