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 | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 rights reserved. | 6 rights reserved. |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 327 void notifyClientsInternal(MarkFinishedOption); | 327 void notifyClientsInternal(MarkFinishedOption); |
| 328 void markClientFinished(ResourceClient*); | 328 void markClientFinished(ResourceClient*); |
| 329 | 329 |
| 330 virtual bool hasClientsOrObservers() const { | 330 virtual bool hasClientsOrObservers() const { |
| 331 return !m_clients.isEmpty() || !m_clientsAwaitingCallback.isEmpty() || | 331 return !m_clients.isEmpty() || !m_clientsAwaitingCallback.isEmpty() || |
| 332 !m_finishedClients.isEmpty(); | 332 !m_finishedClients.isEmpty(); |
| 333 } | 333 } |
| 334 virtual void destroyDecodedDataForFailedRevalidation() {} | 334 virtual void destroyDecodedDataForFailedRevalidation() {} |
| 335 | 335 |
| 336 void setEncodedSize(size_t); | 336 void setEncodedSize(size_t); |
| 337 void setEncodedSizeMemoryUsage(size_t); | |
| 338 void setDecodedSize(size_t); | 337 void setDecodedSize(size_t); |
| 339 void didAccessDecodedData(); | 338 void didAccessDecodedData(); |
| 340 | 339 |
| 341 void finishPendingClients(); | 340 void finishPendingClients(); |
| 342 | 341 |
| 343 virtual void didAddClient(ResourceClient*); | 342 virtual void didAddClient(ResourceClient*); |
| 344 void willAddClientOrObserver(PreloadReferencePolicy); | 343 void willAddClientOrObserver(PreloadReferencePolicy); |
| 345 | 344 |
| 346 void didRemoveClientOrObserver(); | 345 void didRemoveClientOrObserver(); |
| 347 virtual void allClientsAndObserversRemoved(); | 346 virtual void allClientsAndObserversRemoved(); |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 375 } | 374 } |
| 376 DataBufferingPolicy dataBufferingPolicy() const { | 375 DataBufferingPolicy dataBufferingPolicy() const { |
| 377 return m_options.dataBufferingPolicy; | 376 return m_options.dataBufferingPolicy; |
| 378 } | 377 } |
| 379 | 378 |
| 380 void setCachePolicyBypassingCache(); | 379 void setCachePolicyBypassingCache(); |
| 381 void setLoFiStateOff(); | 380 void setLoFiStateOff(); |
| 382 void clearRangeRequestHeader(); | 381 void clearRangeRequestHeader(); |
| 383 | 382 |
| 384 SharedBuffer* data() const { return m_data.get(); } | 383 SharedBuffer* data() const { return m_data.get(); } |
| 385 void clearData() { m_data.clear(); } | 384 void clearData(); |
| 386 | 385 |
| 387 class ProhibitAddRemoveClientInScope : public AutoReset<bool> { | 386 class ProhibitAddRemoveClientInScope : public AutoReset<bool> { |
| 388 public: | 387 public: |
| 389 ProhibitAddRemoveClientInScope(Resource* resource) | 388 ProhibitAddRemoveClientInScope(Resource* resource) |
| 390 : AutoReset(&resource->m_isAddRemoveClientProhibited, true) {} | 389 : AutoReset(&resource->m_isAddRemoveClientProhibited, true) {} |
| 391 }; | 390 }; |
| 392 | 391 |
| 393 private: | 392 private: |
| 394 class ResourceCallback; | 393 class ResourceCallback; |
| 395 class CachedMetadataHandlerImpl; | 394 class CachedMetadataHandlerImpl; |
| 396 class ServiceWorkerResponseCachedMetadataHandler; | 395 class ServiceWorkerResponseCachedMetadataHandler; |
| 397 | 396 |
| 398 void cancelTimerFired(TimerBase*); | 397 void cancelTimerFired(TimerBase*); |
| 399 | 398 |
| 400 void revalidationSucceeded(const ResourceResponse&); | 399 void revalidationSucceeded(const ResourceResponse&); |
| 401 void revalidationFailed(); | 400 void revalidationFailed(); |
| 402 | 401 |
| 402 void setEncodedSizeMemoryUsage(size_t); | |
|
yhirano
2016/11/08 01:59:41
[optional] do we need this function?
hiroshige
2016/11/09 07:33:43
Removed.
| |
| 403 size_t calculateOverheadSize() const; | 403 size_t calculateOverheadSize() const; |
| 404 | 404 |
| 405 String reasonNotDeletable() const; | 405 String reasonNotDeletable() const; |
| 406 | 406 |
| 407 // MemoryCoordinatorClient overrides: | 407 // MemoryCoordinatorClient overrides: |
| 408 void onMemoryStateChange(MemoryState) override; | 408 void onMemoryStateChange(MemoryState) override; |
| 409 | 409 |
| 410 Member<CachedMetadataHandlerImpl> m_cacheHandler; | 410 Member<CachedMetadataHandlerImpl> m_cacheHandler; |
| 411 RefPtr<SecurityOrigin> m_fetcherSecurityOrigin; | 411 RefPtr<SecurityOrigin> m_fetcherSecurityOrigin; |
| 412 | 412 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 481 }; | 481 }; |
| 482 | 482 |
| 483 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 483 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
| 484 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \ | 484 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \ |
| 485 resource->getType() == Resource::typeName, \ | 485 resource->getType() == Resource::typeName, \ |
| 486 resource.getType() == Resource::typeName); | 486 resource.getType() == Resource::typeName); |
| 487 | 487 |
| 488 } // namespace blink | 488 } // namespace blink |
| 489 | 489 |
| 490 #endif | 490 #endif |
| OLD | NEW |