Chromium Code Reviews| Index: third_party/WebKit/Source/core/fetch/Resource.h |
| diff --git a/third_party/WebKit/Source/core/fetch/Resource.h b/third_party/WebKit/Source/core/fetch/Resource.h |
| index d531ba9238a701cf07b63fb27007c78c9902ddf8..dbd67115c3bebef87107b1f2f1fc0a001d5d8367 100644 |
| --- a/third_party/WebKit/Source/core/fetch/Resource.h |
| +++ b/third_party/WebKit/Source/core/fetch/Resource.h |
| @@ -310,6 +310,17 @@ class CORE_EXPORT Resource : public GarbageCollectedFinalized<Resource>, |
| virtual bool canReuse(const ResourceRequest&) const { return true; } |
| + // If cache-aware loading is activated, this callback is called when the first |
| + // disk-cache-only request failed due to cache miss. |
| + virtual void willReloadAfterDiskCacheMiss() {} |
|
kinuko
2016/11/08 06:10:18
nit/optional:
This method naming feels a little w
Shao-Chuan Lee
2016/11/08 06:28:01
SGTM, but I wonder if it's better to mention "disk
kinuko
2016/11/08 06:42:15
Oh that's true, so maybe the current name is just
Shao-Chuan Lee
2016/11/08 07:19:06
Done, PTAL
|
| + |
| + // TODO(shaochuan): This is for saving back the actual ResourceRequest sent |
| + // in ResourceFetcher::startLoad() for retry in cache-aware loading, remove |
| + // once ResourceRequest is not modified in startLoad(). crbug.com/632580 |
| + void setResourceRequest(const ResourceRequest& resourceRequest) { |
| + m_resourceRequest = resourceRequest; |
| + } |
| + |
| // Used by the MemoryCache to reduce the memory consumption of the entry. |
| void prune(); |