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

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

Issue 2390583002: [WIP] WebFonts cache-aware timeout adaption (Closed)
Patch Set: check ERR_CACHE_MISS directly in ResourceError 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 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();

Powered by Google App Engine
This is Rietveld 408576698