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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp

Issue 2398733003: Cache SubResourceIntegrity checks at Resource (Closed)
Patch Set: add include 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/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 5148237632f9e90a4be11e45ba063ce0cbd0ff40..3c3063d4a1099cdc878066f235f98ca112cbfe38 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -776,15 +776,14 @@ ResourceFetcher::determineRevalidationPolicy(Resource::Type type,
return Load;
// Checks if the resource has an explicit policy about integrity metadata.
- // Currently only applies to ScriptResources.
//
- // This is necessary because ScriptResource objects do not keep the raw data
- // around after the source is accessed once, so if the resource is accessed
- // from the MemoryCache for a second time, there is no way to redo an
- // integrity check.
+ // This is necessary because ScriptResource and CSSStyleSheetResource objects
+ // do not keep the raw data around after the source is accessed once, so if
+ // the resource is accessed from the MemoryCache for a second time, there is
+ // no way to redo an integrity check.
//
// Thus, Blink implements a scheme where it caches the integrity information
- // for a ScriptResource after the first time it is checked, and if there is
+ // for those resources after the first time it is checked, and if there is
// another request for that resource, with the same integrity metadata, Blink
// skips the integrity calculation. However, if the integrity metadata is a
// mismatch, the MemoryCache must be skipped here, and a new request for the
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.cpp ('k') | third_party/WebKit/Source/core/fetch/ScriptResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698