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

Side by Side Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp

Issue 1642523002: [MemoryCache] Split UMAs for RevalidationPolicy for preloading/regular requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 resource = preCacheData(request, factory, substituteData); 384 resource = preCacheData(request, factory, substituteData);
385 if (!resource) 385 if (!resource)
386 resource = memoryCache()->resourceForURL(url, getCacheIdentifier()); 386 resource = memoryCache()->resourceForURL(url, getCacheIdentifier());
387 387
388 // See if we can use an existing resource from the cache. If so, we need to move it to be load blocking. 388 // See if we can use an existing resource from the cache. If so, we need to move it to be load blocking.
389 moveCachedNonBlockingResourceToBlocking(resource.get(), request); 389 moveCachedNonBlockingResourceToBlocking(resource.get(), request);
390 390
391 const RevalidationPolicy policy = determineRevalidationPolicy(factory.type() , request, resource.get(), isStaticData); 391 const RevalidationPolicy policy = determineRevalidationPolicy(factory.type() , request, resource.get(), isStaticData);
392 392
393 String histogramName = "Blink.MemoryCache.RevalidationPolicy."; 393 String histogramName = "Blink.MemoryCache.RevalidationPolicy.";
394 if (request.forPreload())
395 histogramName.append("Preload.");
394 histogramName.append(Resource::resourceTypeName(factory.type())); 396 histogramName.append(Resource::resourceTypeName(factory.type()));
395 Platform::current()->histogramEnumeration(histogramName.utf8().data(), polic y, Load + 1); 397 Platform::current()->histogramEnumeration(histogramName.utf8().data(), polic y, Load + 1);
396 398
397 switch (policy) { 399 switch (policy) {
398 case Reload: 400 case Reload:
399 memoryCache()->remove(resource.get()); 401 memoryCache()->remove(resource.get());
400 // Fall through 402 // Fall through
401 case Load: 403 case Load:
402 resource = createResourceForLoading(request, request.charset(), factory) ; 404 resource = createResourceForLoading(request, request.charset(), factory) ;
403 break; 405 break;
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 visitor->trace(m_loaders); 1168 visitor->trace(m_loaders);
1167 visitor->trace(m_nonBlockingLoaders); 1169 visitor->trace(m_nonBlockingLoaders);
1168 #if ENABLE(OILPAN) 1170 #if ENABLE(OILPAN)
1169 visitor->trace(m_documentResources); 1171 visitor->trace(m_documentResources);
1170 visitor->trace(m_preloads); 1172 visitor->trace(m_preloads);
1171 visitor->trace(m_resourceTimingInfoMap); 1173 visitor->trace(m_resourceTimingInfoMap);
1172 #endif 1174 #endif
1173 } 1175 }
1174 1176
1175 } // namespace blink 1177 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698