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

Unified Diff: Source/web/WebCache.cpp

Issue 1278403007: [tracing] Fix accounting of WebCache memory statistics (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@oilpan_light
Patch Set: Changing internal api to use size_t. Created 5 years, 4 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 | « Source/core/fetch/MemoryCache.h ('k') | public/web/WebCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebCache.cpp
diff --git a/Source/web/WebCache.cpp b/Source/web/WebCache.cpp
index 1b6f1dadd034c5b902e06bf11183a14cd6f1abbd..fc115da98534c7634e4cacf4b1d85bfad94b7f28 100644
--- a/Source/web/WebCache.cpp
+++ b/Source/web/WebCache.cpp
@@ -40,10 +40,12 @@ namespace blink {
static void ToResourceTypeStat(const MemoryCache::TypeStatistic& from,
WebCache::ResourceTypeStat& to)
{
- to.count = static_cast<size_t>(from.count);
- to.size = static_cast<size_t>(from.size);
- to.liveSize = static_cast<size_t>(from.liveSize);
- to.decodedSize = static_cast<size_t>(from.decodedSize);
+ to.count = from.count;
+ to.size = from.size;
+ to.liveSize = from.liveSize;
+ to.decodedSize = from.decodedSize;
+ to.purgeableSize = from.purgedSize;
+ to.purgedSize = from.purgedSize;
}
void WebCache::setCapacities(
@@ -86,6 +88,7 @@ void WebCache::getResourceTypeStats(ResourceTypeStats* result)
ToResourceTypeStat(stats.scripts, result->scripts);
ToResourceTypeStat(stats.xslStyleSheets, result->xslStyleSheets);
ToResourceTypeStat(stats.fonts, result->fonts);
+ ToResourceTypeStat(stats.other, result->other);
} else
memset(result, 0, sizeof(WebCache::ResourceTypeStats));
}
« no previous file with comments | « Source/core/fetch/MemoryCache.h ('k') | public/web/WebCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698