Commit aaa40dd2 authored by andersca@apple.com's avatar andersca@apple.com

Remove dead CachedMetadata code

https://bugs.webkit.org/show_bug.cgi?id=114093

Reviewed by Geoffrey Garen.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* loader/CachedMetadata.cpp: Removed.
* loader/CachedMetadata.h: Removed.
* loader/ResourceLoader.h:
(ResourceLoader):
* loader/SubresourceLoader.cpp:
* loader/SubresourceLoader.h:
(SubresourceLoader):
* loader/ThreadableLoaderClient.h:
* loader/WorkerThreadableLoader.cpp:
* loader/WorkerThreadableLoader.h:
(MainThreadBridge):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::reportMemoryUsage):
* loader/cache/CachedResource.h:
(WebCore):
(CachedResource):
* platform/network/ResourceHandle.cpp:
* platform/network/ResourceHandle.h:
(ResourceHandle):
* platform/network/ResourceHandleClient.h:
(ResourceHandleClient):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5fb14b6d
......@@ -1670,7 +1670,6 @@ set(WebCore_SOURCES
inspector/WorkerInspectorController.cpp
inspector/WorkerRuntimeAgent.cpp
loader/CachedMetadata.cpp
loader/CookieJar.cpp
loader/CrossOriginAccessControl.cpp
loader/CrossOriginPreflightResultCache.cpp
......
2013-04-06 Anders Carlsson <andersca@apple.com>
Remove dead CachedMetadata code
https://bugs.webkit.org/show_bug.cgi?id=114093
Reviewed by Geoffrey Garen.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* loader/CachedMetadata.cpp: Removed.
* loader/CachedMetadata.h: Removed.
* loader/ResourceLoader.h:
(ResourceLoader):
* loader/SubresourceLoader.cpp:
* loader/SubresourceLoader.h:
(SubresourceLoader):
* loader/ThreadableLoaderClient.h:
* loader/WorkerThreadableLoader.cpp:
* loader/WorkerThreadableLoader.h:
(MainThreadBridge):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::reportMemoryUsage):
* loader/cache/CachedResource.h:
(WebCore):
(CachedResource):
* platform/network/ResourceHandle.cpp:
* platform/network/ResourceHandle.h:
(ResourceHandle):
* platform/network/ResourceHandleClient.h:
(ResourceHandleClient):
2013-04-06 Anders Carlsson <andersca@apple.com>
Remove more dead Chromium code
......@@ -4028,8 +4028,6 @@ webcore_sources += \
Source/WebCore/loader/cache/CachedXSLStyleSheet.h \
Source/WebCore/loader/cache/MemoryCache.h \
Source/WebCore/loader/cache/CachePolicy.h \
Source/WebCore/loader/CachedMetadata.cpp \
Source/WebCore/loader/CachedMetadata.h \
Source/WebCore/loader/CookieJar.cpp \
Source/WebCore/loader/CookieJar.h \
Source/WebCore/loader/CrossOriginAccessControl.cpp \
......
......@@ -848,7 +848,6 @@ SOURCES += \
loader/appcache/ManifestParser.cpp \
loader/archive/ArchiveResource.cpp \
loader/archive/ArchiveResourceCollection.cpp \
loader/CachedMetadata.cpp \
loader/cache/MemoryCache.cpp \
loader/cache/CachedCSSStyleSheet.cpp \
loader/cache/CachedFont.cpp \
......
......@@ -27966,14 +27966,6 @@
<Filter
Name="loader"
>
<File
RelativePath="..\loader\CachedMetadata.cpp"
>
</File>
<File
RelativePath="..\loader\CachedMetadata.h"
>
</File>
<File
RelativePath="..\loader\CookieJar.cpp"
>
......@@ -3975,7 +3975,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\page\win\FrameWin.cpp" />
<ClCompile Include="..\loader\CachedMetadata.cpp" />
<ClCompile Include="..\loader\CookieJar.cpp" />
<ClCompile Include="..\loader\CrossOriginAccessControl.cpp" />
<ClCompile Include="..\loader\CrossOriginPreflightResultCache.cpp" />
......@@ -11460,7 +11459,6 @@
<ClInclude Include="..\page\WindowFocusAllowedIndicator.h" />
<ClInclude Include="..\page\WorkerNavigator.h" />
<ClInclude Include="..\page\win\FrameWin.h" />
<ClInclude Include="..\loader\CachedMetadata.h" />
<ClInclude Include="..\loader\CookieJar.h" />
<ClInclude Include="..\loader\CrossOriginAccessControl.h" />
<ClInclude Include="..\loader\CrossOriginPreflightResultCache.h" />
......@@ -2220,9 +2220,6 @@
<ClCompile Include="..\page\win\FrameWin.cpp">
<Filter>page\win</Filter>
</ClCompile>
<ClCompile Include="..\loader\CachedMetadata.cpp">
<Filter>loader</Filter>
</ClCompile>
<ClCompile Include="..\loader\CookieJar.cpp">
<Filter>loader</Filter>
</ClCompile>
......@@ -9000,9 +8997,6 @@
<ClInclude Include="..\page\win\FrameWin.h">
<Filter>page\win</Filter>
</ClInclude>
<ClInclude Include="..\loader\CachedMetadata.h">
<Filter>loader</Filter>
</ClInclude>
<ClInclude Include="..\loader\CookieJar.h">
<Filter>loader</Filter>
</ClInclude>
......
......@@ -1483,7 +1483,6 @@
4FA3B90A125CD12200300BAD /* InspectorState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FA3B908125CD12100300BAD /* InspectorState.cpp */; };
4FA3B90B125CD12200300BAD /* InspectorState.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FA3B909125CD12200300BAD /* InspectorState.h */; };
4FB390AD15EF61F3007AD51F /* GeneratedImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FB390AC15EF61F3007AD51F /* GeneratedImage.cpp */; };
4FC8534C1644272300D1C275 /* CachedMetadata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FC853491644271B00D1C275 /* CachedMetadata.cpp */; };
4FD8D0F2119C718B002FA825 /* ScriptGCEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */; };
4FD8D0F3119C718B002FA825 /* ScriptGCEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */; };
4FFC022B1643B710004E1638 /* NodeRareData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB48661643A67E00F70C07 /* NodeRareData.cpp */; };
......@@ -7870,8 +7869,6 @@
4FAB48641643A66D00F70C07 /* ElementRareData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ElementRareData.cpp; sourceTree = "<group>"; };
4FAB48661643A67E00F70C07 /* NodeRareData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeRareData.cpp; sourceTree = "<group>"; };
4FB390AC15EF61F3007AD51F /* GeneratedImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeneratedImage.cpp; sourceTree = "<group>"; };
4FC853491644271B00D1C275 /* CachedMetadata.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedMetadata.cpp; sourceTree = "<group>"; };
4FC8534A1644271B00D1C275 /* CachedMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedMetadata.h; sourceTree = "<group>"; };
4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptGCEvent.cpp; sourceTree = "<group>"; };
4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptGCEvent.h; sourceTree = "<group>"; };
501BAAA813950E2C00F7ACEB /* WindRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindRule.h; sourceTree = "<group>"; };
......@@ -19083,8 +19080,6 @@
7EE6847312D26E5500E79415 /* cf */,
5126E6B60A2E3AEF005C29FA /* icon */,
93A1EAA20A5634D8006960A0 /* mac */,
4FC853491644271B00D1C275 /* CachedMetadata.cpp */,
4FC8534A1644271B00D1C275 /* CachedMetadata.h */,
E1424C91164B52C800F32D40 /* CookieJar.cpp */,
E1424C92164B52C800F32D40 /* CookieJar.h */,
E1C416160F6563180092D2FB /* CrossOriginAccessControl.cpp */,
......@@ -24507,7 +24502,6 @@
BC64B4CB0CB4295D005F2B62 /* CachedFont.cpp in Sources */,
51C0AA410F2AA15E001648C2 /* CachedFrame.cpp in Sources */,
BCB16C1B0979C3BD00467741 /* CachedImage.cpp in Sources */,
4FC8534C1644272300D1C275 /* CachedMetadata.cpp in Sources */,
5101846A0B08602A004A825F /* CachedPage.cpp in Sources */,
D0EDA774143E303C0028E383 /* CachedRawResource.cpp in Sources */,
BCB16C1F0979C3BD00467741 /* CachedResource.cpp in Sources */,
/*
* Copyright (C) 2011 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "CachedMetadata.h"
#include "WebCoreMemoryInstrumentation.h"
#include <wtf/MemoryInstrumentationVector.h>
namespace WebCore {
void CachedMetadata::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this);
info.addMember(m_serializedData, "serializedData");
}
} // namespace WebCore
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CachedMetadata_h
#define CachedMetadata_h
#include <wtf/Forward.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
namespace WebCore {
// Metadata retrieved from the embedding application's cache.
//
// Serialized data is NOT portable across architectures. However, reading the
// data type ID will reject data generated with a different byte-order.
class CachedMetadata : public RefCounted<CachedMetadata> {
public:
static PassRefPtr<CachedMetadata> create(unsigned dataTypeID, const char* data, size_t size)
{
return adoptRef(new CachedMetadata(dataTypeID, data, size));
}
static PassRefPtr<CachedMetadata> deserialize(const char* data, size_t size)
{
return adoptRef(new CachedMetadata(data, size));
}
const Vector<char>& serialize() const
{
return m_serializedData;
}
~CachedMetadata() { }
unsigned dataTypeID() const
{
return readUnsigned(dataTypeIDStart);
}
const char* data() const
{
if (m_serializedData.size() < dataStart)
return 0;
return m_serializedData.data() + dataStart;
}
size_t size() const
{
if (m_serializedData.size() < dataStart)
return 0;
return m_serializedData.size() - dataStart;
}
void reportMemoryUsage(MemoryObjectInfo*) const;
private:
// Reads an unsigned value at position. Returns 0 on error.
unsigned readUnsigned(size_t position) const
{
if (m_serializedData.size() < position + sizeof(unsigned))
return 0;
return *reinterpret_cast_ptr<unsigned*>(const_cast<char*>(m_serializedData.data() + position));
}
// Appends an unsigned value to the end of the serialized data.
void appendUnsigned(unsigned value)
{
m_serializedData.append(reinterpret_cast<const char*>(&value), sizeof(unsigned));
}
CachedMetadata(const char* data, size_t size)
{
// Serialized metadata should have non-empty data.
ASSERT(size > dataStart);
m_serializedData.append(data, size);
}
CachedMetadata(unsigned dataTypeID, const char* data, size_t size)
{
// Don't allow an ID of 0, it is used internally to indicate errors.
ASSERT(dataTypeID);
ASSERT(data);
appendUnsigned(dataTypeID);
m_serializedData.append(data, size);
}
// Serialization offsets. Format: [DATA_TYPE_ID][DATA].
static const size_t dataTypeIDStart = 0;
static const size_t dataStart = sizeof(unsigned);
// Since the serialization format supports random access, storing it in
// serialized form avoids need for a copy during serialization.
Vector<char> m_serializedData;
};
}
#endif
......@@ -83,7 +83,6 @@ public:
virtual void didReceiveResponse(const ResourceResponse&);
virtual void didReceiveData(const char*, int, long long encodedDataLength, DataPayloadType);
virtual void didReceiveBuffer(PassRefPtr<SharedBuffer>, long long encodedDataLength, DataPayloadType);
virtual void didReceiveCachedMetadata(const char*, int) { }
void willStopBufferingData(const char*, int);
virtual void didFinishLoading(double finishTime);
virtual void didFail(const ResourceError&);
......@@ -106,7 +105,6 @@ public:
virtual void didReceiveResponse(ResourceHandle*, const ResourceResponse&) OVERRIDE;
virtual void didReceiveData(ResourceHandle*, const char*, int, int encodedDataLength) OVERRIDE;
virtual void didReceiveBuffer(ResourceHandle*, PassRefPtr<SharedBuffer>, int encodedDataLength) OVERRIDE;
virtual void didReceiveCachedMetadata(ResourceHandle*, const char* data, int length) OVERRIDE { didReceiveCachedMetadata(data, length); }
virtual void didFinishLoading(ResourceHandle*, double finishTime) OVERRIDE;
virtual void didFail(ResourceHandle*, const ResourceError&) OVERRIDE;
virtual void wasBlocked(ResourceHandle*) OVERRIDE;
......
......@@ -267,13 +267,6 @@ void SubresourceLoader::sendDataToResource(const char* data, int length)
m_resource->data(resourceData(), false);
}
void SubresourceLoader::didReceiveCachedMetadata(const char* data, int length)
{
ASSERT(m_state == Initialized);
ASSERT(!m_resource->resourceToRevalidate());
m_resource->setSerializedCachedMetadata(data, length);
}
void SubresourceLoader::didFinishLoading(double finishTime)
{
if (m_state != Initialized)
......
......@@ -63,7 +63,6 @@ private:
virtual void didReceiveResponse(const ResourceResponse&) OVERRIDE;
virtual void didReceiveData(const char*, int, long long encodedDataLength, DataPayloadType) OVERRIDE;
virtual void didReceiveBuffer(PassRefPtr<SharedBuffer>, long long encodedDataLength, DataPayloadType) OVERRIDE;
virtual void didReceiveCachedMetadata(const char*, int) OVERRIDE;
virtual void didFinishLoading(double finishTime) OVERRIDE;
virtual void didFail(const ResourceError&) OVERRIDE;
virtual void willCancel(const ResourceError&) OVERRIDE;
......
......@@ -44,7 +44,6 @@ namespace WebCore {
virtual void didReceiveResponse(unsigned long /*identifier*/, const ResourceResponse&) { }
virtual void didReceiveData(const char*, int /*dataLength*/) { }
virtual void didReceiveCachedMetadata(const char*, int /*dataLength*/) { }
virtual void didFinishLoading(unsigned long /*identifier*/, double /*finishTime*/) { }
virtual void didFail(const ResourceError&) { }
virtual void didFailAccessControlCheck(const ResourceError& error) { didFail(error); }
......
......@@ -202,19 +202,6 @@ void WorkerThreadableLoader::MainThreadBridge::didReceiveData(const char* data,
m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidReceiveData, m_workerClientWrapper, vector.release()), m_taskMode);
}
static void workerContextDidReceiveCachedMetadata(ScriptExecutionContext* context, RefPtr<ThreadableLoaderClientWrapper> workerClientWrapper, PassOwnPtr<Vector<char> > vectorData)
{
ASSERT_UNUSED(context, context->isWorkerContext());
workerClientWrapper->didReceiveCachedMetadata(vectorData->data(), vectorData->size());
}
void WorkerThreadableLoader::MainThreadBridge::didReceiveCachedMetadata(const char* data, int dataLength)
{
OwnPtr<Vector<char> > vector = adoptPtr(new Vector<char>(dataLength)); // needs to be an OwnPtr for usage with createCallbackTask.
memcpy(vector->data(), data, dataLength);
m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidReceiveCachedMetadata, m_workerClientWrapper, vector.release()), m_taskMode);
}
static void workerContextDidFinishLoading(ScriptExecutionContext* context, RefPtr<ThreadableLoaderClientWrapper> workerClientWrapper, unsigned long identifier, double finishTime)
{
ASSERT_UNUSED(context, context->isWorkerContext());
......
......@@ -115,7 +115,6 @@ namespace WebCore {
virtual void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent) OVERRIDE;
virtual void didReceiveResponse(unsigned long identifier, const ResourceResponse&) OVERRIDE;
virtual void didReceiveData(const char*, int dataLength) OVERRIDE;
virtual void didReceiveCachedMetadata(const char*, int dataLength) OVERRIDE;
virtual void didFinishLoading(unsigned long identifier, double finishTime) OVERRIDE;
virtual void didFail(const ResourceError&) OVERRIDE;
virtual void didFailAccessControlCheck(const ResourceError&) OVERRIDE;
......
......@@ -25,7 +25,6 @@
#include "CachedResource.h"
#include "MemoryCache.h"
#include "CachedMetadata.h"
#include "CachedResourceClient.h"
#include "CachedResourceClientWalker.h"
#include "CachedResourceHandle.h"
......@@ -461,34 +460,6 @@ void CachedResource::responseReceived(const ResourceResponse& response)
setEncoding(encoding);
}
void CachedResource::setSerializedCachedMetadata(const char* data, size_t size)
{
// We only expect to receive cached metadata from the platform once.
// If this triggers, it indicates an efficiency problem which is most
// likely unexpected in code designed to improve performance.
ASSERT(!m_cachedMetadata);
m_cachedMetadata = CachedMetadata::deserialize(data, size);
}
void CachedResource::setCachedMetadata(unsigned dataTypeID, const char* data, size_t size)
{
// Currently, only one type of cached metadata per resource is supported.
// If the need arises for multiple types of metadata per resource this could
// be enhanced to store types of metadata in a map.
ASSERT(!m_cachedMetadata);
m_cachedMetadata = CachedMetadata::create(dataTypeID, data, size);
ResourceHandle::cacheMetadata(m_response, m_cachedMetadata->serialize());
}
CachedMetadata* CachedResource::cachedMetadata(unsigned dataTypeID) const
{
if (!m_cachedMetadata || m_cachedMetadata->dataTypeID() != dataTypeID)
return 0;
return m_cachedMetadata.get();
}
void CachedResource::stopLoading()
{
ASSERT(m_loader);
......@@ -952,7 +923,6 @@ void CachedResource::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
info.addMember(m_loader, "loader");
info.addMember(m_response, "response");
info.addMember(m_data, "data");
info.addMember(m_cachedMetadata, "cachedMetadata");
info.addMember(m_nextInAllResourcesList, "nextInAllResourcesList");
info.addMember(m_prevInAllResourcesList, "prevInAllResourcesList");
info.addMember(m_nextInLiveResourcesList, "nextInLiveResourcesList");
......
......@@ -42,7 +42,6 @@
namespace WebCore {
class MemoryCache;
class CachedMetadata;
class CachedResourceClient;
class CachedResourceHandleBase;
class CachedResourceLoader;
......@@ -194,17 +193,6 @@ public:
void setResponse(const ResourceResponse& response) { m_response = response; }
const ResourceResponse& response() const { return m_response; }
// Sets the serialized metadata retrieved from the platform's cache.
void setSerializedCachedMetadata(const char*, size_t);
// Caches the given metadata in association with this resource and suggests
// that the platform persist it. The dataTypeID is a pseudo-randomly chosen
// identifier that is used to distinguish data generated by the caller.
void setCachedMetadata(unsigned dataTypeID, const char*, size_t);
// Returns cached metadata of the given type associated with this resource.
CachedMetadata* cachedMetadata(unsigned dataTypeID) const;
bool canDelete() const { return !hasClients() && !m_loader && !m_preloadCount && !m_handleCount && !m_resourceToRevalidate && !m_proxyResource; }
bool hasOneHandle() const { return m_handleCount == 1; }
......@@ -319,8 +307,6 @@ private:
String m_fragmentIdentifierForRequest;
RefPtr<CachedMetadata> m_cachedMetadata;
ResourceError m_error;
double m_lastDecodedAccessTime; // Used as a "thrash guard" in the cache
......
......@@ -239,9 +239,4 @@ void ResourceHandle::didChangePriority(ResourceLoadPriority)
// Optionally implemented by platform.
}
void ResourceHandle::cacheMetadata(const ResourceResponse&, const Vector<char>&)
{
// Optionally implemented by platform.
}
} // namespace WebCore
......@@ -103,8 +103,6 @@ public:
static PassRefPtr<ResourceHandle> create(NetworkingContext*, const ResourceRequest&, ResourceHandleClient*, bool defersLoading, bool shouldContentSniff);
static void loadResourceSynchronously(NetworkingContext*, const ResourceRequest&, StoredCredentials, ResourceError&, ResourceResponse&, Vector<char>& data);
static void cacheMetadata(const ResourceResponse&, const Vector<char>&);
virtual ~ResourceHandle();
#if PLATFORM(MAC) || USE(CFNETWORK)
......
......@@ -69,7 +69,6 @@ namespace WebCore {
virtual void didReceiveData(ResourceHandle*, const char*, int, int /*encodedDataLength*/) { }
virtual void didReceiveBuffer(ResourceHandle*, PassRefPtr<SharedBuffer>, int encodedDataLength);
virtual void didReceiveCachedMetadata(ResourceHandle*, const char*, int) { }
virtual void didFinishLoading(ResourceHandle*, double /*finishTime*/) { }
virtual void didFail(ResourceHandle*, const ResourceError&) { }
virtual void wasBlocked(ResourceHandle*) { }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment