| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 258 |
| 259 virtual bool canReuse(const ResourceRequest&) const { return true; } | 259 virtual bool canReuse(const ResourceRequest&) const { return true; } |
| 260 | 260 |
| 261 // Used by the MemoryCache to reduce the memory consumption of the entry. | 261 // Used by the MemoryCache to reduce the memory consumption of the entry. |
| 262 void prune(); | 262 void prune(); |
| 263 | 263 |
| 264 virtual void onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*)
const; | 264 virtual void onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*)
const; |
| 265 | 265 |
| 266 static const char* resourceTypeToString(Type, const FetchInitiatorInfo&); | 266 static const char* resourceTypeToString(Type, const FetchInitiatorInfo&); |
| 267 | 267 |
| 268 // TODO(japhet): Remove once oilpan ships, it doesn't need the WeakPtr. |
| 269 WeakPtrWillBeRawPtr<Resource> asWeakPtr(); |
| 270 |
| 268 #ifdef ENABLE_RESOURCE_IS_DELETED_CHECK | 271 #ifdef ENABLE_RESOURCE_IS_DELETED_CHECK |
| 269 void assertAlive() const { RELEASE_ASSERT(!m_deleted); } | 272 void assertAlive() const { RELEASE_ASSERT(!m_deleted); } |
| 270 #else | 273 #else |
| 271 void assertAlive() const { } | 274 void assertAlive() const { } |
| 272 #endif | 275 #endif |
| 273 | 276 |
| 274 protected: | 277 protected: |
| 275 virtual void checkNotify(); | 278 virtual void checkNotify(); |
| 276 virtual void finishOnePart(); | 279 virtual void finishOnePart(); |
| 277 | 280 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 bool unlock(); | 378 bool unlock(); |
| 376 | 379 |
| 377 bool hasRightHandleCountApartFromCache(unsigned targetCount) const; | 380 bool hasRightHandleCountApartFromCache(unsigned targetCount) const; |
| 378 | 381 |
| 379 void setCachedMetadata(unsigned dataTypeID, const char*, size_t, CachedMetad
ataHandler::CacheType); | 382 void setCachedMetadata(unsigned dataTypeID, const char*, size_t, CachedMetad
ataHandler::CacheType); |
| 380 void clearCachedMetadata(CachedMetadataHandler::CacheType); | 383 void clearCachedMetadata(CachedMetadataHandler::CacheType); |
| 381 CachedMetadata* cachedMetadata(unsigned dataTypeID) const; | 384 CachedMetadata* cachedMetadata(unsigned dataTypeID) const; |
| 382 | 385 |
| 383 String m_fragmentIdentifierForRequest; | 386 String m_fragmentIdentifierForRequest; |
| 384 | 387 |
| 388 #if !ENABLE(OILPAN) |
| 389 WeakPtrFactory<Resource> m_weakPtrFactory; |
| 390 #endif |
| 391 |
| 385 RefPtr<CachedMetadata> m_cachedMetadata; | 392 RefPtr<CachedMetadata> m_cachedMetadata; |
| 386 OwnPtrWillBeMember<CacheHandler> m_cacheHandler; | 393 OwnPtrWillBeMember<CacheHandler> m_cacheHandler; |
| 387 | 394 |
| 388 ResourceError m_error; | 395 ResourceError m_error; |
| 389 | 396 |
| 390 double m_loadFinishTime; | 397 double m_loadFinishTime; |
| 391 | 398 |
| 392 unsigned long m_identifier; | 399 unsigned long m_identifier; |
| 393 | 400 |
| 394 size_t m_encodedSize; | 401 size_t m_encodedSize; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 const char* ResourceTypeName(Resource::Type); | 446 const char* ResourceTypeName(Resource::Type); |
| 440 #endif | 447 #endif |
| 441 | 448 |
| 442 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 449 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
| 443 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() =
= Resource::typeName, resource.type() == Resource::typeName); \ | 450 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() =
= Resource::typeName, resource.type() == Resource::typeName); \ |
| 444 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource
>& ptr) { return to##typeName##Resource(ptr.get()); } | 451 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource
>& ptr) { return to##typeName##Resource(ptr.get()); } |
| 445 | 452 |
| 446 } | 453 } |
| 447 | 454 |
| 448 #endif | 455 #endif |
| OLD | NEW |