Commit d7ab4074 authored by japhet@chromium.org's avatar japhet@chromium.org

2010-12-14 Nate Chapin <japhet@chromium.org>

        Reviewed by Adam Barth.

        Rename Loader to CachedResourceRequest.
        https://bugs.webkit.org/show_bug.cgi?id=50848

        No new tests, rename only.

        * Android.mk:
        * CMakeLists.txt:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSStyleSelector.cpp:
        * loader/cache/CachedCSSStyleSheet.cpp:
        * loader/cache/CachedFont.cpp:
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::setRequest):
        * loader/cache/CachedResource.h:
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::load):
        (WebCore::CachedResourceLoader::loadDone):
        (WebCore::CachedResourceLoader::cancelRequests):
        * loader/cache/CachedResourceLoader.h:
        * loader/cache/CachedResourceRequest.cpp: Copied from WebCore/loader/loader.cpp.
        * loader/cache/CachedResourceRequest.h: Copied from WebCore/loader/loader.h.
        * loader/loader.cpp: Removed.
        * loader/loader.h: Removed.
        * xml/XSLStyleSheetLibxslt.cpp:
        * xml/XSLTProcessor.cpp:
        * xml/XSLTProcessorLibxslt.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9285815d
......@@ -357,6 +357,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
loader/CrossOriginAccessControl.cpp \
loader/CrossOriginPreflightResultCache.cpp \
loader/cache/CachedResourceLoader.cpp \
loader/cache/CachedResourceRequest.cpp \
loader/DocumentLoader.cpp \
loader/DocumentThreadableLoader.cpp \
loader/DocumentWriter.cpp \
......@@ -398,8 +399,6 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
loader/icon/IconRecord.cpp \
loader/icon/PageURLRecord.cpp \
\
loader/loader.cpp \
\
page/BarInfo.cpp \
page/Chrome.cpp \
page/Console.cpp \
......
......@@ -1204,7 +1204,6 @@ SET(WebCore_SOURCES
loader/TextResourceDecoder.cpp
loader/ThreadableLoader.cpp
loader/WorkerThreadableLoader.cpp
loader/loader.cpp
loader/appcache/ApplicationCache.cpp
loader/appcache/ApplicationCacheGroup.cpp
......@@ -1225,6 +1224,7 @@ SET(WebCore_SOURCES
loader/cache/CachedResourceClientWalker.cpp
loader/cache/CachedResourceHandle.cpp
loader/cache/CachedResourceLoader.cpp
loader/cache/CachedResourceRequest.cpp
loader/cache/CachedScript.cpp
loader/cache/CachedXSLStyleSheet.cpp
loader/cache/MemoryCache.cpp
......
2010-12-14 Nate Chapin <japhet@chromium.org>
Reviewed by Adam Barth.
Rename Loader to CachedResourceRequest.
https://bugs.webkit.org/show_bug.cgi?id=50848
No new tests, rename only.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSStyleSelector.cpp:
* loader/cache/CachedCSSStyleSheet.cpp:
* loader/cache/CachedFont.cpp:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::setRequest):
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::load):
(WebCore::CachedResourceLoader::loadDone):
(WebCore::CachedResourceLoader::cancelRequests):
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedResourceRequest.cpp: Copied from WebCore/loader/loader.cpp.
* loader/cache/CachedResourceRequest.h: Copied from WebCore/loader/loader.h.
* loader/loader.cpp: Removed.
* loader/loader.h: Removed.
* xml/XSLStyleSheetLibxslt.cpp:
* xml/XSLTProcessor.cpp:
* xml/XSLTProcessorLibxslt.cpp:
2010-12-14 David Hyatt <hyatt@apple.com>
Reviewed by Tim Hatcher.
......
......@@ -2029,6 +2029,8 @@ webcore_sources += \
WebCore/loader/cache/CachedResourceHandle.h \
WebCore/loader/cache/CachedResourceLoader.cpp \
WebCore/loader/cache/CachedResourceLoader.h \
WebCore/loader/cache/CachedResourceRequest.cpp \
WebCore/loader/cache/CachedResourceRequest.h \
WebCore/loader/cache/CachedScript.cpp \
WebCore/loader/cache/CachedScript.h \
WebCore/loader/cache/CachedXSLStyleSheet.cpp \
......@@ -2075,8 +2077,6 @@ webcore_sources += \
WebCore/loader/icon/PageURLRecord.h \
WebCore/loader/ImageLoader.cpp \
WebCore/loader/ImageLoader.h \
WebCore/loader/loader.cpp \
WebCore/loader/loader.h \
WebCore/loader/MainResourceLoader.cpp \
WebCore/loader/MainResourceLoader.h \
WebCore/loader/NavigationAction.cpp \
......
......@@ -2090,6 +2090,8 @@
'loader/cache/CachedResourceHandle.h',
'loader/cache/CachedResourceLoader.cpp',
'loader/cache/CachedResourceLoader.h',
'loader/cache/CachedResourceRequest.cpp',
'loader/cache/CachedResourceRequest.h',
'loader/cache/CachedScript.cpp',
'loader/cache/CachedScript.h',
'loader/cache/CachedXSLStyleSheet.cpp',
......@@ -2183,8 +2185,6 @@
'loader/ThreadableLoaderClientWrapper.h',
'loader/WorkerThreadableLoader.cpp',
'loader/WorkerThreadableLoader.h',
'loader/loader.cpp',
'loader/loader.h',
'mathml/MathMLElement.cpp',
'mathml/MathMLElement.h',
'mathml/MathMLInlineContainerElement.cpp',
......
......@@ -1059,6 +1059,7 @@ SOURCES += \
loader/cache/CachedImage.cpp \
loader/cache/CachedResourceClientWalker.cpp \
loader/cache/CachedResourceHandle.cpp \
loader/cache/CachedResourceRequest.cpp \
loader/cache/CachedResource.cpp \
loader/cache/CachedScript.cpp \
loader/cache/CachedXSLStyleSheet.cpp \
......@@ -1076,7 +1077,6 @@ SOURCES += \
loader/FTPDirectoryParser.cpp \
loader/icon/IconLoader.cpp \
loader/ImageLoader.cpp \
loader/loader.cpp \
loader/MainResourceLoader.cpp \
loader/NavigationAction.cpp \
loader/NetscapePlugInStreamLoader.cpp \
......
......@@ -24849,14 +24849,6 @@
RelativePath="..\loader\ImageLoader.h"
>
</File>
<File
RelativePath="..\loader\loader.cpp"
>
</File>
<File
RelativePath="..\loader\loader.h"
>
</File>
<File
RelativePath="..\loader\MainResourceLoader.cpp"
>
......@@ -25244,6 +25236,14 @@
RelativePath="..\loader\cache\CachedResourceLoader.h"
>
</File>
<File
RelativePath="..\loader\cache\CachedResourceRequest.cpp"
>
</File>
<File
RelativePath="..\loader\cache\CachedResourceRequest.h"
>
</File>
<File
RelativePath="..\loader\cache\CachedScript.cpp"
>
......@@ -5071,8 +5071,6 @@
BCB16C280979C3BD00467741 /* CachedXSLStyleSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16C0F0979C3BD00467741 /* CachedXSLStyleSheet.h */; };
BCB16C290979C3BD00467741 /* CachedResourceLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB16C100979C3BD00467741 /* CachedResourceLoader.cpp */; };
BCB16C2A0979C3BD00467741 /* CachedResourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16C110979C3BD00467741 /* CachedResourceLoader.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCB16C2C0979C3BD00467741 /* loader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB16C130979C3BD00467741 /* loader.cpp */; };
BCB16C2D0979C3BD00467741 /* loader.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16C140979C3BD00467741 /* loader.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCB773610C17853D00132BA4 /* JSNodeFilterCondition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB7735E0C17853D00132BA4 /* JSNodeFilterCondition.cpp */; };
BCB773620C17853D00132BA4 /* JSNodeFilterCondition.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB7735F0C17853D00132BA4 /* JSNodeFilterCondition.h */; };
BCB773630C17853D00132BA4 /* JSNodeFilterCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB773600C17853D00132BA4 /* JSNodeFilterCustom.cpp */; };
......@@ -5347,6 +5345,8 @@
D0B0556909C6700100307E43 /* CreateLinkCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0B0556709C6700100307E43 /* CreateLinkCommand.cpp */; };
D0CE58F8125E4CC200F3F199 /* ResourceLoadScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0CE58F6125E4CC200F3F199 /* ResourceLoadScheduler.cpp */; };
D0CE58F9125E4CC200F3F199 /* ResourceLoadScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = D0CE58F7125E4CC200F3F199 /* ResourceLoadScheduler.h */; settings = {ATTRIBUTES = (Private, ); }; };
D0D141B212B2BF5200E39620 /* CachedResourceRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0D141B012B2BF5200E39620 /* CachedResourceRequest.cpp */; };
D0D141B312B2BF5200E39620 /* CachedResourceRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = D0D141B112B2BF5200E39620 /* CachedResourceRequest.h */; };
D0FF2A5D11F8C45A007E74E0 /* PingLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FF2A5B11F8C45A007E74E0 /* PingLoader.cpp */; };
D0FF2A5E11F8C45A007E74E0 /* PingLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FF2A5C11F8C45A007E74E0 /* PingLoader.h */; };
D23CA55D0AB0EAAE005108A5 /* JSRangeException.h in Headers */ = {isa = PBXBuildFile; fileRef = D23CA55C0AB0EAAE005108A5 /* JSRangeException.h */; };
......@@ -11329,8 +11329,6 @@
BCB16C0F0979C3BD00467741 /* CachedXSLStyleSheet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CachedXSLStyleSheet.h; sourceTree = "<group>"; };
BCB16C100979C3BD00467741 /* CachedResourceLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CachedResourceLoader.cpp; sourceTree = "<group>"; };
BCB16C110979C3BD00467741 /* CachedResourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CachedResourceLoader.h; sourceTree = "<group>"; };
BCB16C130979C3BD00467741 /* loader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = loader.cpp; sourceTree = "<group>"; };
BCB16C140979C3BD00467741 /* loader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = loader.h; sourceTree = "<group>"; };
BCB7735E0C17853D00132BA4 /* JSNodeFilterCondition.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeFilterCondition.cpp; sourceTree = "<group>"; };
BCB7735F0C17853D00132BA4 /* JSNodeFilterCondition.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSNodeFilterCondition.h; sourceTree = "<group>"; };
BCB773600C17853D00132BA4 /* JSNodeFilterCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeFilterCustom.cpp; sourceTree = "<group>"; };
......@@ -11632,6 +11630,8 @@
D0B0556709C6700100307E43 /* CreateLinkCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CreateLinkCommand.cpp; sourceTree = "<group>"; };
D0CE58F6125E4CC200F3F199 /* ResourceLoadScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoadScheduler.cpp; sourceTree = "<group>"; };
D0CE58F7125E4CC200F3F199 /* ResourceLoadScheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoadScheduler.h; sourceTree = "<group>"; };
D0D141B012B2BF5200E39620 /* CachedResourceRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedResourceRequest.cpp; sourceTree = "<group>"; };
D0D141B112B2BF5200E39620 /* CachedResourceRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedResourceRequest.h; sourceTree = "<group>"; };
D0FF2A5B11F8C45A007E74E0 /* PingLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PingLoader.cpp; sourceTree = "<group>"; };
D0FF2A5C11F8C45A007E74E0 /* PingLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PingLoader.h; sourceTree = "<group>"; };
D23CA5480AB0E983005108A5 /* RangeException.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = RangeException.idl; sourceTree = "<group>"; };
......@@ -16597,6 +16597,8 @@
E47B4BE60E71241600038854 /* CachedResourceHandle.h */,
BCB16C100979C3BD00467741 /* CachedResourceLoader.cpp */,
BCB16C110979C3BD00467741 /* CachedResourceLoader.h */,
D0D141B012B2BF5200E39620 /* CachedResourceRequest.cpp */,
D0D141B112B2BF5200E39620 /* CachedResourceRequest.h */,
BCB16C0A0979C3BD00467741 /* CachedScript.cpp */,
BCB16C0B0979C3BD00467741 /* CachedScript.h */,
BCB16C0E0979C3BD00467741 /* CachedXSLStyleSheet.cpp */,
......@@ -17859,8 +17861,6 @@
97DCE20010807C750057D394 /* HistoryController.h */,
089582530E857A7E00F82C83 /* ImageLoader.cpp */,
089582540E857A7E00F82C83 /* ImageLoader.h */,
BCB16C130979C3BD00467741 /* loader.cpp */,
BCB16C140979C3BD00467741 /* loader.h */,
93E227DC0AF589AD00D48324 /* MainResourceLoader.cpp */,
656D37290ADBA5DE00A4554D /* MainResourceLoader.h */,
93CCF05F0AF6CA7600018E89 /* NavigationAction.cpp */,
......@@ -21180,7 +21180,6 @@
AB31C91E10AE1B8E000C7B92 /* LineClampValue.h in Headers */,
89B5EAA211E8003D00F2367E /* LineEnding.h in Headers */,
A7AD2F880EC89D07008AB002 /* LinkHash.h in Headers */,
BCB16C2D0979C3BD00467741 /* loader.h in Headers */,
656D37320ADBA5DE00A4554D /* LoaderNSURLExtras.h in Headers */,
06E81ED70AB5D5E900C87837 /* LocalCurrentGraphicsContext.h in Headers */,
89878568122CA064003AABDA /* LocalFileSystem.h in Headers */,
......@@ -22209,6 +22208,7 @@
FDA15ECA12B03F50003A583A /* JSRealtimeAnalyserNode.h in Headers */,
FDA15ECE12B03F61003A583A /* JSJavaScriptAudioNode.h in Headers */,
FDA15ED212B03F94003A583A /* JSDelayNode.h in Headers */,
D0D141B312B2BF5200E39620 /* CachedResourceRequest.h in Headers */,
6EBF0E4912A8926100DB1709 /* OESTextureFloat.h in Headers */,
6EBF0E5512A8929800DB1709 /* WebGLExtension.h in Headers */,
6EBF0E7712A9868800DB1709 /* JSOESTextureFloat.h in Headers */,
......@@ -24006,7 +24006,6 @@
84730D901248F0B300D3A9C9 /* LightSource.cpp in Sources */,
89B5EAA111E8003D00F2367E /* LineEnding.cpp in Sources */,
A7AD2F870EC89D07008AB002 /* LinkHash.cpp in Sources */,
BCB16C2C0979C3BD00467741 /* loader.cpp in Sources */,
656D37330ADBA5DE00A4554D /* LoaderNSURLExtras.mm in Sources */,
06E81EEC0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm in Sources */,
89878567122CA064003AABDA /* LocalFileSystem.cpp in Sources */,
......@@ -24881,6 +24880,7 @@
FDA15ED112B03F94003A583A /* JSDelayNode.cpp in Sources */,
494BC40D12AEDD9E00743BD2 /* TransformationMatrixCA.cpp in Sources */,
BC51156E12B1749C00C96754 /* ScrollAnimatorMac.mm in Sources */,
D0D141B212B2BF5200E39620 /* CachedResourceRequest.cpp in Sources */,
6EBF0E4812A8926100DB1709 /* OESTextureFloat.cpp in Sources */,
6EBF0E5412A8929800DB1709 /* WebGLExtension.cpp in Sources */,
6EBF0E7612A9868800DB1709 /* JSOESTextureFloat.cpp in Sources */,
......@@ -90,7 +90,6 @@
#include "WebKitCSSKeyframesRule.h"
#include "WebKitCSSTransformValue.h"
#include "XMLNames.h"
#include "loader.h"
#include <wtf/StdLibExtras.h>
#include <wtf/Vector.h>
......
......@@ -33,7 +33,6 @@
#include "HTTPParsers.h"
#include "TextResourceDecoder.h"
#include "SharedBuffer.h"
#include "loader.h"
#include <wtf/Vector.h>
namespace WebCore {
......
......@@ -38,7 +38,6 @@
#include "MemoryCache.h"
#include "SharedBuffer.h"
#include "TextResourceDecoder.h"
#include "loader.h"
#include <wtf/Vector.h>
#ifdef STORE_FONT_CUSTOM_PLATFORM_DATA
......
......@@ -30,6 +30,7 @@
#include "CachedResourceClientWalker.h"
#include "CachedResourceHandle.h"
#include "CachedResourceLoader.h"
#include "CachedResourceRequest.h"
#include "Frame.h"
#include "FrameLoaderClient.h"
#include "KURL.h"
......@@ -37,7 +38,6 @@
#include "PurgeableBuffer.h"
#include "ResourceHandle.h"
#include "SharedBuffer.h"
#include "loader.h"
#include <wtf/CurrentTime.h>
#include <wtf/MathExtras.h>
#include <wtf/RefCountedLeakCounter.h>
......@@ -225,7 +225,7 @@ CachedMetadata* CachedResource::cachedMetadata(unsigned dataTypeID) const
return m_cachedMetadata.get();
}
void CachedResource::setRequest(Loader* request)
void CachedResource::setRequest(CachedResourceRequest* request)
{
if (request && !m_request)
m_status = Pending;
......
......@@ -42,9 +42,9 @@ class CachedMetadata;
class CachedResourceClient;
class CachedResourceHandleBase;
class CachedResourceLoader;
class CachedResourceRequest;
class Frame;
class InspectorResource;
class Loader;
class PurgeableBuffer;
// A resource that is held in the cache. Classes who want to use this object should derive
......@@ -153,7 +153,7 @@ public:
void setInLiveDecodedResourcesList(bool b) { m_inLiveDecodedResourcesList = b; }
bool inLiveDecodedResourcesList() { return m_inLiveDecodedResourcesList; }
void setRequest(Loader*);
void setRequest(CachedResourceRequest*);
SharedBuffer* data() const { ASSERT(!m_purgeableData); return m_data.get(); }
......@@ -219,7 +219,7 @@ protected:
String m_url;
String m_accept;
Loader* m_request;
CachedResourceRequest* m_request;
ResourceLoadPriority m_loadPriority;
ResourceResponse m_response;
......
......@@ -43,7 +43,6 @@
#include "PingLoader.h"
#include "SecurityOrigin.h"
#include "Settings.h"
#include "loader.h"
#include <wtf/text/StringConcatenate.h>
#define PRELOAD_DEBUG 0
......@@ -336,15 +335,15 @@ void CachedResourceLoader::load(CachedResource* resource, bool incremental, Secu
{
incrementRequestCount(resource);
RefPtr<Loader> request = Loader::load(this, resource, incremental, securityCheck, sendResourceLoadCallbacks);
RefPtr<CachedResourceRequest> request = CachedResourceRequest::load(this, resource, incremental, securityCheck, sendResourceLoadCallbacks);
if (request)
m_requests.add(request);
}
void CachedResourceLoader::loadDone(Loader* request)
void CachedResourceLoader::loadDone(CachedResourceRequest* request)
{
m_loadFinishing = false;
RefPtr<Loader> protect(request);
RefPtr<CachedResourceRequest> protect(request);
if (request)
m_requests.remove(request);
if (frame())
......@@ -355,7 +354,7 @@ void CachedResourceLoader::loadDone(Loader* request)
void CachedResourceLoader::cancelRequests()
{
clearPendingPreloads();
Vector<Loader*, 256> requestsToCancel;
Vector<CachedResourceRequest*, 256> requestsToCancel;
RequestSet::iterator end = m_requests.end();
for (RequestSet::iterator i = m_requests.begin(); i != end; ++i)
requestsToCancel.append((*i).get());
......
......@@ -28,9 +28,9 @@
#include "CachedResource.h"
#include "CachedResourceHandle.h"
#include "CachedResourceRequest.h"
#include "CachePolicy.h"
#include "ResourceLoadPriority.h"
#include "loader.h"
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#include <wtf/ListHashSet.h>
......@@ -90,7 +90,7 @@ public:
void load(CachedResource*, bool incremental = false, SecurityCheckPolicy = DoSecurityCheck, bool sendResourceLoadCallbacks = true);
void loadFinishing() { m_loadFinishing = true; }
void loadDone(Loader*);
void loadDone(CachedResourceRequest*);
void cancelRequests();
void setAllowStaleResources(bool allowStaleResources) { m_allowStaleResources = allowStaleResources; }
......@@ -118,7 +118,7 @@ private:
mutable DocumentResourceMap m_documentResources;
Document* m_document;
typedef HashSet<RefPtr<Loader> > RequestSet;
typedef HashSet<RefPtr<CachedResourceRequest> > RequestSet;
RequestSet m_requests;
int m_requestCount;
......
......@@ -22,7 +22,7 @@
*/
#include "config.h"
#include "loader.h"
#include "CachedResourceRequest.h"
#include "MemoryCache.h"
#include "CachedImage.h"
......@@ -65,7 +65,7 @@ static ResourceRequest::TargetType cachedResourceTypeToTargetType(CachedResource
return ResourceRequest::TargetIsSubresource;
}
Loader::Loader(CachedResourceLoader* cachedResourceLoader, CachedResource* resource, bool incremental)
CachedResourceRequest::CachedResourceRequest(CachedResourceLoader* cachedResourceLoader, CachedResource* resource, bool incremental)
: m_cachedResourceLoader(cachedResourceLoader)
, m_resource(resource)
, m_incremental(incremental)
......@@ -75,14 +75,14 @@ Loader::Loader(CachedResourceLoader* cachedResourceLoader, CachedResource* resou
m_resource->setRequest(this);
}
Loader::~Loader()
CachedResourceRequest::~CachedResourceRequest()
{
m_resource->setRequest(0);
}
PassRefPtr<Loader> Loader::load(CachedResourceLoader* cachedResourceLoader, CachedResource* resource, bool incremental, SecurityCheckPolicy securityCheck, bool sendResourceLoadCallbacks)
PassRefPtr<CachedResourceRequest> CachedResourceRequest::load(CachedResourceLoader* cachedResourceLoader, CachedResource* resource, bool incremental, SecurityCheckPolicy securityCheck, bool sendResourceLoadCallbacks)
{
RefPtr<Loader> request = adoptRef(new Loader(cachedResourceLoader, resource, incremental));
RefPtr<CachedResourceRequest> request = adoptRef(new CachedResourceRequest(cachedResourceLoader, resource, incremental));
ResourceRequest resourceRequest(resource->url());
resourceRequest.setTargetType(cachedResourceTypeToTargetType(resource->type()));
......@@ -111,7 +111,7 @@ PassRefPtr<Loader> Loader::load(CachedResourceLoader* cachedResourceLoader, Cach
if (resource->type() == CachedResource::LinkPrefetch)
resourceRequest.setHTTPHeaderField("Purpose", "prefetch");
#endif
ResourceLoadPriority priority = resource->loadPriority();
RefPtr<SubresourceLoader> loader = resourceLoadScheduler()->scheduleSubresourceLoad(cachedResourceLoader->document()->frame(),
......@@ -131,12 +131,12 @@ PassRefPtr<Loader> Loader::load(CachedResourceLoader* cachedResourceLoader, Cach
return request.release();
}
void Loader::willSendRequest(SubresourceLoader*, ResourceRequest&, const ResourceResponse&)
void CachedResourceRequest::willSendRequest(SubresourceLoader*, ResourceRequest&, const ResourceResponse&)
{
m_resource->setRequestedFromNetworkingLayer();
}
void Loader::didFinishLoading(SubresourceLoader* loader)
void CachedResourceRequest::didFinishLoading(SubresourceLoader* loader)
{
if (m_finishing)
return;
......@@ -163,14 +163,14 @@ void Loader::didFinishLoading(SubresourceLoader* loader)
m_cachedResourceLoader->loadDone(this);
}
void Loader::didFail(SubresourceLoader*, const ResourceError&)
void CachedResourceRequest::didFail(SubresourceLoader*, const ResourceError&)
{
if (!m_loader)
return;
didFail();
}
void Loader::didFail(bool cancelled)
void CachedResourceRequest::didFail(bool cancelled)
{
if (m_finishing)
return;
......@@ -199,7 +199,7 @@ void Loader::didFail(bool cancelled)
m_cachedResourceLoader->loadDone(this);
}
void Loader::didReceiveResponse(SubresourceLoader* loader, const ResourceResponse& response)
void CachedResourceRequest::didReceiveResponse(SubresourceLoader* loader, const ResourceResponse& response)
{
ASSERT(loader == m_loader.get());
if (m_resource->isCacheValidator()) {
......@@ -247,7 +247,7 @@ void Loader::didReceiveResponse(SubresourceLoader* loader, const ResourceRespons
}
}
void Loader::didReceiveData(SubresourceLoader* loader, const char* data, int size)
void CachedResourceRequest::didReceiveData(SubresourceLoader* loader, const char* data, int size)
{
ASSERT(loader == m_loader.get());
ASSERT(!m_resource->isCacheValidator());
......@@ -271,7 +271,7 @@ void Loader::didReceiveData(SubresourceLoader* loader, const char* data, int siz
m_resource->data(loader->resourceData(), false);
}
void Loader::didReceiveCachedMetadata(SubresourceLoader*, const char* data, int size)
void CachedResourceRequest::didReceiveCachedMetadata(SubresourceLoader*, const char* data, int size)
{
ASSERT(!m_resource->isCacheValidator());
m_resource->setSerializedCachedMetadata(data, size);
......
......@@ -19,8 +19,8 @@
Boston, MA 02110-1301, USA.
*/
#ifndef loader_h
#define loader_h
#ifndef CachedResourceRequest_h
#define CachedResourceRequest_h
#include "FrameLoaderTypes.h"
#include "SubresourceLoader.h"
......@@ -35,16 +35,16 @@ namespace WebCore {
class CachedResourceLoader;
class Request;
class Loader : public RefCounted<Loader>, private SubresourceLoaderClient {
class CachedResourceRequest : public RefCounted<CachedResourceRequest>, private SubresourceLoaderClient {
public:
static PassRefPtr<Loader> load(CachedResourceLoader*, CachedResource*, bool incremental, SecurityCheckPolicy, bool sendResourceLoadCallbacks);\
~Loader();
static PassRefPtr<CachedResourceRequest> load(CachedResourceLoader*, CachedResource*, bool incremental, SecurityCheckPolicy, bool sendResourceLoadCallbacks);
~CachedResourceRequest();
void didFail(bool cancelled = false);
CachedResourceLoader* cachedResourceLoader() const { return m_cachedResourceLoader; }
private:
Loader(CachedResourceLoader*, CachedResource*, bool incremental);
CachedResourceRequest(CachedResourceLoader*, CachedResource*, bool incremental);
virtual void willSendRequest(SubresourceLoader*, ResourceRequest&, const ResourceResponse&);
virtual void didReceiveResponse(SubresourceLoader*, const ResourceResponse&);
virtual void didReceiveData(SubresourceLoader*, const char*, int);
......
......@@ -35,7 +35,6 @@
#include "XMLDocumentParserScope.h"
#include "XSLImportRule.h"
#include "XSLTProcessor.h"
#include "loader.h"
#include <wtf/text/CString.h>
#include <libxml/uri.h>
......
......@@ -37,7 +37,6 @@
#include "Page.h"
#include "Text.h"
#include "TextResourceDecoder.h"
#include "loader.h"
#include "markup.h"
#include <wtf/Assertions.h>
......
......@@ -39,7 +39,6 @@
#include "XSLStyleSheet.h"
#include "XSLTExtensions.h"
#include "XSLTUnicodeSort.h"
#include "loader.h"
#include "markup.h"
#include <libxslt/imports.h>
#include <libxslt/variables.h>
......
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