Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: third_party/WebKit/Source/core/fetch/Resource.h

Issue 2454983002: Cache-aware Resource loading (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 bc272329c9858b715bd6e4862e63a727392ee523..523db9b052940cf60b644188b3d2dd7dd63181a6 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() {}
+
+ // 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();

Powered by Google App Engine
This is Rietveld 408576698