| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 bool canUseCacheValidator(); | 236 bool canUseCacheValidator(); |
| 237 bool isCacheValidator() const { return m_resourceToRevalidate; } | 237 bool isCacheValidator() const { return m_resourceToRevalidate; } |
| 238 Resource* resourceToRevalidate() const { return m_resourceToRevalidate; } | 238 Resource* resourceToRevalidate() const { return m_resourceToRevalidate; } |
| 239 void setResourceToRevalidate(Resource*); | 239 void setResourceToRevalidate(Resource*); |
| 240 bool hasCacheControlNoStoreHeader(); | 240 bool hasCacheControlNoStoreHeader(); |
| 241 | 241 |
| 242 bool isPurgeable() const; | 242 bool isPurgeable() const; |
| 243 bool wasPurged() const; | 243 bool wasPurged() const; |
| 244 bool lock(); | 244 bool lock(); |
| 245 | 245 |
| 246 void setCacheIdentifier(const String& cacheIdentifier) { m_cacheIdentifier =
cacheIdentifier; } |
| 247 String cacheIdentifier() const { return m_cacheIdentifier; }; |
| 248 |
| 246 virtual void didSendData(unsigned long long /* bytesSent */, unsigned long l
ong /* totalBytesToBeSent */) { } | 249 virtual void didSendData(unsigned long long /* bytesSent */, unsigned long l
ong /* totalBytesToBeSent */) { } |
| 247 virtual void didDownloadData(int) { } | 250 virtual void didDownloadData(int) { } |
| 248 | 251 |
| 249 double loadFinishTime() const { return m_loadFinishTime; } | 252 double loadFinishTime() const { return m_loadFinishTime; } |
| 250 | 253 |
| 251 virtual bool canReuse(const ResourceRequest&) const { return true; } | 254 virtual bool canReuse(const ResourceRequest&) const { return true; } |
| 252 | 255 |
| 253 // Used by the MemoryCache to reduce the memory consumption of the entry. | 256 // Used by the MemoryCache to reduce the memory consumption of the entry. |
| 254 void prune(); | 257 void prune(); |
| 255 | 258 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 double m_loadFinishTime; | 371 double m_loadFinishTime; |
| 369 | 372 |
| 370 unsigned long m_identifier; | 373 unsigned long m_identifier; |
| 371 | 374 |
| 372 size_t m_encodedSize; | 375 size_t m_encodedSize; |
| 373 size_t m_decodedSize; | 376 size_t m_decodedSize; |
| 374 unsigned m_handleCount; | 377 unsigned m_handleCount; |
| 375 unsigned m_preloadCount; | 378 unsigned m_preloadCount; |
| 376 unsigned m_protectorCount; | 379 unsigned m_protectorCount; |
| 377 | 380 |
| 381 String m_cacheIdentifier; |
| 382 |
| 378 unsigned m_preloadResult : 2; // PreloadResult | 383 unsigned m_preloadResult : 2; // PreloadResult |
| 379 unsigned m_requestedFromNetworkingLayer : 1; | 384 unsigned m_requestedFromNetworkingLayer : 1; |
| 380 | 385 |
| 381 unsigned m_loading : 1; | 386 unsigned m_loading : 1; |
| 382 | 387 |
| 383 unsigned m_switchingClientsToRevalidatedResource : 1; | 388 unsigned m_switchingClientsToRevalidatedResource : 1; |
| 384 | 389 |
| 385 unsigned m_type : 4; // Type | 390 unsigned m_type : 4; // Type |
| 386 unsigned m_status : 3; // Status | 391 unsigned m_status : 3; // Status |
| 387 | 392 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 416 const char* ResourceTypeName(Resource::Type); | 421 const char* ResourceTypeName(Resource::Type); |
| 417 #endif | 422 #endif |
| 418 | 423 |
| 419 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 424 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
| 420 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() =
= Resource::typeName, resource.type() == Resource::typeName); \ | 425 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() =
= Resource::typeName, resource.type() == Resource::typeName); \ |
| 421 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource
>& ptr) { return to##typeName##Resource(ptr.get()); } | 426 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource
>& ptr) { return to##typeName##Resource(ptr.get()); } |
| 422 | 427 |
| 423 } | 428 } |
| 424 | 429 |
| 425 #endif | 430 #endif |
| OLD | NEW |