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

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

Issue 2390583002: [WIP] WebFonts cache-aware timeout adaption (Closed)
Patch Set: handle case in RemoteFontFaceSource if cache-aware deactivated in startLoad(), rebase 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 02b238927bb2a71c675b2c57e7b01f890ca571a3..ee9ea9de52dae3b86079a5ce6fc1c565ce984424 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.h
+++ b/third_party/WebKit/Source/core/fetch/Resource.h
@@ -295,6 +295,19 @@ 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(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.
+ 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