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

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

Issue 1771473002: [MemoryCache] Exclude data URLs and SubstituteData from MemoryCache UMAs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | 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/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 6df47ed01b2daa6e7d645ff106df600d0166a9b1..b89b6c7e3df7332f79e08cf925c32451f9bd5546 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -434,17 +434,20 @@ PassRefPtrWillBeRawPtr<Resource> ResourceFetcher::requestResource(FetchRequest&
const RevalidationPolicy policy = determineRevalidationPolicy(factory.type(), request, resource.get(), isStaticData);
- if (request.forPreload()) {
- DEFINE_RESOURCE_HISTOGRAM("Preload.");
- } else {
- DEFINE_RESOURCE_HISTOGRAM("");
- }
- // Aims to count Resource only referenced from MemoryCache (i.e. what
- // would be dead if MemoryCache holds weak references to Resource).
- // Currently we check references to Resource from ResourceClient and
- // |m_preloads| only, because they are major sources of references.
- if (resource && !resource->hasClients() && (!m_preloads || !m_preloads->contains(resource)) && !isStaticData) {
- DEFINE_RESOURCE_HISTOGRAM("Dead.");
+ if (!isStaticData) {
Nate Chapin 2016/03/04 23:44:00 Maybe put the contents of this if() statement in a
hiroshige 2016/03/05 00:03:55 Done. Also removed the if() statement because it i
+ if (request.forPreload()) {
+ DEFINE_RESOURCE_HISTOGRAM("Preload.");
+ } else {
+ DEFINE_RESOURCE_HISTOGRAM("");
+ }
+
+ // Aims to count Resource only referenced from MemoryCache (i.e. what
+ // would be dead if MemoryCache holds weak references to Resource).
+ // Currently we check references to Resource from ResourceClient and
+ // |m_preloads| only, because they are major sources of references.
+ if (resource && !resource->hasClients() && (!m_preloads || !m_preloads->contains(resource))) {
+ DEFINE_RESOURCE_HISTOGRAM("Dead.");
+ }
}
switch (policy) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698