Chromium Code Reviews| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 251 virtual void didSendData(unsigned long long /* bytesSent */, unsigned long l ong /* totalBytesToBeSent */) { } | 251 virtual void didSendData(unsigned long long /* bytesSent */, unsigned long l ong /* totalBytesToBeSent */) { } |
| 252 virtual void didDownloadData(int) { } | 252 virtual void didDownloadData(int) { } |
| 253 | 253 |
| 254 double loadFinishTime() const { return m_loadFinishTime; } | 254 double loadFinishTime() const { return m_loadFinishTime; } |
| 255 | 255 |
| 256 virtual bool canReuse(const ResourceRequest&) const { return true; } | 256 virtual bool canReuse(const ResourceRequest&) const { return true; } |
| 257 | 257 |
| 258 // Used by the MemoryCache to reduce the memory consumption of the entry. | 258 // Used by the MemoryCache to reduce the memory consumption of the entry. |
| 259 void prune(); | 259 void prune(); |
| 260 | 260 |
| 261 virtual void onMemoryDump(WebProcessMemoryDump*) const; | |
| 262 | |
| 261 static const char* resourceTypeToString(Type, const FetchInitiatorInfo&); | 263 static const char* resourceTypeToString(Type, const FetchInitiatorInfo&); |
| 262 | 264 |
| 263 #ifdef ENABLE_RESOURCE_IS_DELETED_CHECK | 265 #ifdef ENABLE_RESOURCE_IS_DELETED_CHECK |
| 264 void assertAlive() const { RELEASE_ASSERT(!m_deleted); } | 266 void assertAlive() const { RELEASE_ASSERT(!m_deleted); } |
| 265 #else | 267 #else |
| 266 void assertAlive() const { } | 268 void assertAlive() const { } |
| 267 #endif | 269 #endif |
| 268 | 270 |
| 269 protected: | 271 protected: |
| 270 virtual void checkNotify(); | 272 virtual void checkNotify(); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 334 } | 336 } |
| 335 | 337 |
| 336 ResourceRequest m_request; | 338 ResourceRequest m_request; |
| 337 ResourceResponse m_redirectResponse; | 339 ResourceResponse m_redirectResponse; |
| 338 }; | 340 }; |
| 339 const Vector<RedirectPair>& redirectChain() const { return m_redirectChain; } | 341 const Vector<RedirectPair>& redirectChain() const { return m_redirectChain; } |
| 340 | 342 |
| 341 virtual bool isSafeToUnlock() const { return false; } | 343 virtual bool isSafeToUnlock() const { return false; } |
| 342 virtual void destroyDecodedDataIfPossible() { } | 344 virtual void destroyDecodedDataIfPossible() { } |
| 343 | 345 |
| 346 // Returns the memory dump name used for tracing. See Resource::onmemoryDump . | |
|
haraken
2015/09/29 02:44:48
onMemoryDump
ssid
2015/09/29 11:06:37
Done.
| |
| 347 String getMemoryDumpName() const; | |
| 348 | |
| 344 ResourceRequest m_resourceRequest; | 349 ResourceRequest m_resourceRequest; |
| 345 AtomicString m_accept; | 350 AtomicString m_accept; |
| 346 PersistentWillBeMember<ResourceLoader> m_loader; | 351 PersistentWillBeMember<ResourceLoader> m_loader; |
| 347 ResourceLoaderOptions m_options; | 352 ResourceLoaderOptions m_options; |
| 348 | 353 |
| 349 ResourceResponse m_response; | 354 ResourceResponse m_response; |
| 350 double m_responseTimestamp; | 355 double m_responseTimestamp; |
| 351 | 356 |
| 352 RefPtr<SharedBuffer> m_data; | 357 RefPtr<SharedBuffer> m_data; |
| 353 Timer<Resource> m_cancelTimer; | 358 Timer<Resource> m_cancelTimer; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 439 const char* ResourceTypeName(Resource::Type); | 444 const char* ResourceTypeName(Resource::Type); |
| 440 #endif | 445 #endif |
| 441 | 446 |
| 442 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 447 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
| 443 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() = = Resource::typeName, resource.type() == Resource::typeName); \ | 448 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()); } | 449 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource >& ptr) { return to##typeName##Resource(ptr.get()); } |
| 445 | 450 |
| 446 } | 451 } |
| 447 | 452 |
| 448 #endif | 453 #endif |
| OLD | NEW |