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

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

Issue 2454983002: Cache-aware Resource loading (Closed)
Patch Set: nit Created 4 years, 1 month 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..2caefa9afd80b4cd24c0842a992df5b794fd6b72 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceLoader.h
+++ b/third_party/WebKit/Source/core/fetch/ResourceLoader.h
@@ -55,8 +55,9 @@ class CORE_EXPORT ResourceLoader final
WebTaskRunner* loadingTaskRunner,
bool defersLoading);
- // This method is currently only used for service worker fallback request,
- // other users should be careful not to break ResourceLoader state.
+ // This method is currently only used for service worker fallback request and
+ // cache-aware loading, other users should be careful not to break
+ // ResourceLoader state.
void restart(const ResourceRequest&,
WebTaskRunner* loadingTaskRunner,
bool defersLoading);
@@ -67,6 +68,14 @@ class CORE_EXPORT ResourceLoader final
void didChangePriority(ResourceLoadPriority, int intraPriorityValue);
+ // Called before start() to activate cache-aware loading if enabled in
+ // |m_resource->options()| and applicable.
+ void activateCacheAwareLoadingIfNeeded(const ResourceRequest&);
+
+ bool isCacheAwareLoadingActivated() const {
+ return m_isCacheAwareLoadingActivated;
+ }
+
// WebURLLoaderClient
//
// A succesful load will consist of:
@@ -116,6 +125,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
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | third_party/WebKit/Source/core/fetch/ResourceLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698