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

Side by Side Diff: third_party/WebKit/Source/web/WebCache.cpp

Issue 2254593003: Remove purgedSize and purgeableSize from TypeStatistic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SharedBuffer_DoNotUnlock
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 36
37 // A helper method for coverting a MemoryCache::TypeStatistic to a 37 // A helper method for coverting a MemoryCache::TypeStatistic to a
38 // WebCache::ResourceTypeStat. 38 // WebCache::ResourceTypeStat.
39 static void ToResourceTypeStat(const MemoryCache::TypeStatistic& from, 39 static void ToResourceTypeStat(const MemoryCache::TypeStatistic& from,
40 WebCache::ResourceTypeStat& to) 40 WebCache::ResourceTypeStat& to)
41 { 41 {
42 to.count = from.count; 42 to.count = from.count;
43 to.size = from.size; 43 to.size = from.size;
44 to.liveSize = from.liveSize; 44 to.liveSize = from.liveSize;
45 to.decodedSize = from.decodedSize; 45 to.decodedSize = from.decodedSize;
46 to.purgeableSize = from.purgeableSize;
47 to.purgedSize = from.purgedSize;
48 } 46 }
49 47
50 void WebCache::setCapacities( 48 void WebCache::setCapacities(
51 size_t minDeadCapacity, size_t maxDeadCapacity, size_t capacity) 49 size_t minDeadCapacity, size_t maxDeadCapacity, size_t capacity)
52 { 50 {
53 MemoryCache* cache = memoryCache(); 51 MemoryCache* cache = memoryCache();
54 if (cache) 52 if (cache)
55 cache->setCapacities(static_cast<unsigned>(minDeadCapacity), static_cast <unsigned>(maxDeadCapacity), static_cast<unsigned>(capacity)); 53 cache->setCapacities(static_cast<unsigned>(minDeadCapacity), static_cast <unsigned>(maxDeadCapacity), static_cast<unsigned>(capacity));
56 } 54 }
57 55
(...skipping 28 matching lines...) Expand all
86 ToResourceTypeStat(stats.cssStyleSheets, result->cssStyleSheets); 84 ToResourceTypeStat(stats.cssStyleSheets, result->cssStyleSheets);
87 ToResourceTypeStat(stats.scripts, result->scripts); 85 ToResourceTypeStat(stats.scripts, result->scripts);
88 ToResourceTypeStat(stats.xslStyleSheets, result->xslStyleSheets); 86 ToResourceTypeStat(stats.xslStyleSheets, result->xslStyleSheets);
89 ToResourceTypeStat(stats.fonts, result->fonts); 87 ToResourceTypeStat(stats.fonts, result->fonts);
90 ToResourceTypeStat(stats.other, result->other); 88 ToResourceTypeStat(stats.other, result->other);
91 } else 89 } else
92 memset(result, 0, sizeof(WebCache::ResourceTypeStats)); 90 memset(result, 0, sizeof(WebCache::ResourceTypeStats));
93 } 91 }
94 92
95 } // namespace blink 93 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MemoryCache.cpp ('k') | third_party/WebKit/public/web/WebCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698