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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.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
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceLoader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.h
diff --git a/third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.h b/third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.h
index 8e08208cb55aeb9c641cdfe207cb6ce46d245097..6da7bee97041ed8fe44b3d6e95fe0ff1d7148091 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.h
+++ b/third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.h
@@ -71,6 +71,11 @@ enum CORSEnabled { NotCORSEnabled, IsCORSEnabled };
// https://html.spec.whatwg.org/multipage/scripting.html#parser-inserted
enum ParserDisposition { ParserInserted, NotParserInserted };
+enum CacheAwareLoadingEnabled {
+ NotCacheAwareLoadingEnabled,
+ IsCacheAwareLoadingEnabled
+};
+
struct ResourceLoaderOptions {
USING_FAST_MALLOC(ResourceLoaderOptions);
@@ -83,7 +88,8 @@ struct ResourceLoaderOptions {
requestInitiatorContext(DocumentContext),
synchronousPolicy(RequestAsynchronously),
corsEnabled(NotCORSEnabled),
- parserDisposition(ParserInserted) {}
+ parserDisposition(ParserInserted),
+ cacheAwareLoadingEnabled(NotCacheAwareLoadingEnabled) {}
ResourceLoaderOptions(
DataBufferingPolicy dataBufferingPolicy,
@@ -98,7 +104,8 @@ struct ResourceLoaderOptions {
requestInitiatorContext(requestInitiatorContext),
synchronousPolicy(RequestAsynchronously),
corsEnabled(NotCORSEnabled),
- parserDisposition(ParserInserted) {}
+ parserDisposition(ParserInserted),
+ cacheAwareLoadingEnabled(NotCacheAwareLoadingEnabled) {}
// Answers the question "can a separate request with these different options
// be re-used" (e.g. preload request) The safe (but possibly slow) answer is
@@ -139,6 +146,7 @@ struct ResourceLoaderOptions {
String contentSecurityPolicyNonce;
IntegrityMetadataSet integrityMetadata;
ParserDisposition parserDisposition;
+ CacheAwareLoadingEnabled cacheAwareLoadingEnabled;
};
// Encode AtomicString (in FetchInitiatorInfo) as String to cross threads.
@@ -159,7 +167,8 @@ struct CrossThreadResourceLoaderOptionsData {
: nullptr),
contentSecurityPolicyNonce(options.contentSecurityPolicyNonce),
integrityMetadata(options.integrityMetadata),
- parserDisposition(options.parserDisposition) {}
+ parserDisposition(options.parserDisposition),
+ cacheAwareLoadingEnabled(options.cacheAwareLoadingEnabled) {}
operator ResourceLoaderOptions() const {
ResourceLoaderOptions options;
@@ -175,6 +184,7 @@ struct CrossThreadResourceLoaderOptionsData {
options.contentSecurityPolicyNonce = contentSecurityPolicyNonce;
options.integrityMetadata = integrityMetadata;
options.parserDisposition = parserDisposition;
+ options.cacheAwareLoadingEnabled = cacheAwareLoadingEnabled;
return options;
}
@@ -190,6 +200,7 @@ struct CrossThreadResourceLoaderOptionsData {
String contentSecurityPolicyNonce;
IntegrityMetadataSet integrityMetadata;
ParserDisposition parserDisposition;
+ CacheAwareLoadingEnabled cacheAwareLoadingEnabled;
};
template <>
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698