| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> | 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> |
| 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
| 6 | 6 |
| 7 This library is free software; you can redistribute it and/or | 7 This library is free software; you can redistribute it and/or |
| 8 modify it under the terms of the GNU Library General Public | 8 modify it under the terms of the GNU Library General Public |
| 9 License as published by the Free Software Foundation; either | 9 License as published by the Free Software Foundation; either |
| 10 version 2 of the License, or (at your option) any later version. | 10 version 2 of the License, or (at your option) any later version. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "platform/network/ResourceLoadPriority.h" | 29 #include "platform/network/ResourceLoadPriority.h" |
| 30 #include "platform/network/ResourceRequest.h" | 30 #include "platform/network/ResourceRequest.h" |
| 31 #include "platform/network/ResourceResponse.h" | 31 #include "platform/network/ResourceResponse.h" |
| 32 #include "wtf/HashCountedSet.h" | 32 #include "wtf/HashCountedSet.h" |
| 33 #include "wtf/HashSet.h" | 33 #include "wtf/HashSet.h" |
| 34 #include "wtf/OwnPtr.h" | 34 #include "wtf/OwnPtr.h" |
| 35 #include "wtf/text/WTFString.h" | 35 #include "wtf/text/WTFString.h" |
| 36 | 36 |
| 37 namespace WebCore { | 37 namespace WebCore { |
| 38 | 38 |
| 39 struct FetchInitiatorInfo; |
| 39 class MemoryCache; | 40 class MemoryCache; |
| 40 class CachedMetadata; | 41 class CachedMetadata; |
| 41 class ResourceClient; | 42 class ResourceClient; |
| 42 class ResourcePtrBase; | 43 class ResourcePtrBase; |
| 43 class ResourceFetcher; | 44 class ResourceFetcher; |
| 44 class InspectorResource; | 45 class InspectorResource; |
| 45 class PurgeableBuffer; | 46 class PurgeableBuffer; |
| 46 class ResourceLoader; | 47 class ResourceLoader; |
| 47 class SecurityOrigin; | 48 class SecurityOrigin; |
| 48 class SharedBuffer; | 49 class SharedBuffer; |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 // better way to handle the archive case. | 244 // better way to handle the archive case. |
| 244 bool makePurgeable(bool purgeable); | 245 bool makePurgeable(bool purgeable); |
| 245 | 246 |
| 246 virtual void didSendData(unsigned long long /* bytesSent */, unsigned long l
ong /* totalBytesToBeSent */) { } | 247 virtual void didSendData(unsigned long long /* bytesSent */, unsigned long l
ong /* totalBytesToBeSent */) { } |
| 247 virtual void didDownloadData(int) { } | 248 virtual void didDownloadData(int) { } |
| 248 | 249 |
| 249 double loadFinishTime() const { return m_loadFinishTime; } | 250 double loadFinishTime() const { return m_loadFinishTime; } |
| 250 | 251 |
| 251 virtual bool canReuse(const ResourceRequest&) const { return true; } | 252 virtual bool canReuse(const ResourceRequest&) const { return true; } |
| 252 | 253 |
| 254 static const char* resourceTypeToString(Type, const FetchInitiatorInfo&); |
| 255 |
| 253 protected: | 256 protected: |
| 254 virtual void checkNotify(); | 257 virtual void checkNotify(); |
| 255 virtual void finishOnePart(); | 258 virtual void finishOnePart(); |
| 256 | 259 |
| 257 // Normal resource pointers will silently switch what Resource* they referen
ce when we | 260 // Normal resource pointers will silently switch what Resource* they referen
ce when we |
| 258 // successfully revalidated the resource. We need a way to guarantee that th
e Resource | 261 // successfully revalidated the resource. We need a way to guarantee that th
e Resource |
| 259 // that received the 304 response survives long enough to switch everything
over to the | 262 // that received the 304 response survives long enough to switch everything
over to the |
| 260 // revalidatedresource. The normal mechanisms for keeping a Resource alive e
xternally | 263 // revalidatedresource. The normal mechanisms for keeping a Resource alive e
xternally |
| 261 // (ResourcePtrs and ResourceClients registering themselves) don't work in t
his case, so | 264 // (ResourcePtrs and ResourceClients registering themselves) don't work in t
his case, so |
| 262 // have a separate internal protector). | 265 // have a separate internal protector). |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 const char* ResourceTypeName(Resource::Type); | 400 const char* ResourceTypeName(Resource::Type); |
| 398 #endif | 401 #endif |
| 399 | 402 |
| 400 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 403 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
| 401 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() =
= Resource::typeName, resource.type() == Resource::typeName); \ | 404 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() =
= Resource::typeName, resource.type() == Resource::typeName); \ |
| 402 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource
>& ptr) { return to##typeName##Resource(ptr.get()); } | 405 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource
>& ptr) { return to##typeName##Resource(ptr.get()); } |
| 403 | 406 |
| 404 } | 407 } |
| 405 | 408 |
| 406 #endif | 409 #endif |
| OLD | NEW |