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

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

Issue 2454983002: Cache-aware Resource loading (Closed)
Patch Set: fix #3, add DCHECK, add missing header 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/ResourceLoader.h
diff --git a/third_party/WebKit/Source/core/fetch/ResourceLoader.h b/third_party/WebKit/Source/core/fetch/ResourceLoader.h
index 728f0151c7e5f2e9ef1caeb082a1bb89916d4fe5..4c59bd1d6239b606037954ae5d82297339983579 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceLoader.h
+++ b/third_party/WebKit/Source/core/fetch/ResourceLoader.h
@@ -67,6 +67,16 @@ class CORE_EXPORT ResourceLoader final
void didChangePriority(ResourceLoadPriority, int intraPriorityValue);
+ // Activates cache-aware loading and returns true. Returns false and does
+ // nothing if it should not be activated.
+ bool activateCacheAwareLoading(const ResourceRequest&);
+
+ void deactivateCacheAwareLoading();
+
+ bool isCacheAwareLoadingActivated() const {
+ return m_isCacheAwareLoadingActivated;
+ }
+
// WebURLLoaderClient
//
// A succesful load will consist of:
@@ -116,6 +126,7 @@ class CORE_EXPORT ResourceLoader final
std::unique_ptr<WebURLLoader> m_loader;
Member<ResourceFetcher> m_fetcher;
Member<Resource> m_resource;
+ bool m_isCacheAwareLoadingActivated;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698