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 b4b2926a0229b015ec2e02b39c4b3b5b3ab099b3..cfe60b7129a829737de5e2a66f96d05a8210664b 100644 |
--- a/third_party/WebKit/Source/core/fetch/Resource.h |
+++ b/third_party/WebKit/Source/core/fetch/Resource.h |
@@ -310,6 +310,20 @@ 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() {} |
+ |
+ void deactivateCacheAwareLoading() { |
+ m_resourceRequest.deactivateCacheAwareLoading(); |
+ } |
+ |
+ // TODO(shaochuan): Workaround to persist cache-aware state, remove after |
+ // fixed. 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(); |