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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
288 | 288 |
289 void addToEncodedBodyLength(int value) { | 289 void addToEncodedBodyLength(int value) { |
290 m_response.addToEncodedBodyLength(value); | 290 m_response.addToEncodedBodyLength(value); |
291 } | 291 } |
292 void addToDecodedBodyLength(int value) { | 292 void addToDecodedBodyLength(int value) { |
293 m_response.addToDecodedBodyLength(value); | 293 m_response.addToDecodedBodyLength(value); |
294 } | 294 } |
295 | 295 |
296 virtual bool canReuse(const ResourceRequest&) const { return true; } | 296 virtual bool canReuse(const ResourceRequest&) const { return true; } |
297 | 297 |
298 // If cache-aware loading is activated, this callback is called when the first | |
299 // disk-cache-only request failed due to cache miss. | |
300 virtual void willReloadAfterDiskCacheMiss() {} | |
301 | |
302 void deactivateCacheAwareLoading() { | |
303 m_resourceRequest.deactivateCacheAwareLoading(); | |
304 } | |
305 | |
306 // TODO(632580): Workaround to persist cache-aware state, remove after fixed. | |
kouhei (in TOK)
2016/10/20 10:43:07
TODO(username)
Shao-Chuan Lee
2016/10/21 04:35:02
Done.
| |
307 void setResourceRequest(const ResourceRequest& resourceRequest) { | |
308 m_resourceRequest = resourceRequest; | |
309 } | |
310 | |
298 // Used by the MemoryCache to reduce the memory consumption of the entry. | 311 // Used by the MemoryCache to reduce the memory consumption of the entry. |
299 void prune(); | 312 void prune(); |
300 | 313 |
301 virtual void onMemoryDump(WebMemoryDumpLevelOfDetail, | 314 virtual void onMemoryDump(WebMemoryDumpLevelOfDetail, |
302 WebProcessMemoryDump*) const; | 315 WebProcessMemoryDump*) const; |
303 | 316 |
304 static const char* resourceTypeToString(Type, const FetchInitiatorInfo&); | 317 static const char* resourceTypeToString(Type, const FetchInitiatorInfo&); |
305 | 318 |
306 protected: | 319 protected: |
307 Resource(const ResourceRequest&, Type, const ResourceLoaderOptions&); | 320 Resource(const ResourceRequest&, Type, const ResourceLoaderOptions&); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
464 }; | 477 }; |
465 | 478 |
466 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 479 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
467 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \ | 480 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \ |
468 resource->getType() == Resource::typeName, \ | 481 resource->getType() == Resource::typeName, \ |
469 resource.getType() == Resource::typeName); | 482 resource.getType() == Resource::typeName); |
470 | 483 |
471 } // namespace blink | 484 } // namespace blink |
472 | 485 |
473 #endif | 486 #endif |
OLD | NEW |