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

Unified Diff: third_party/WebKit/Source/web/WebCache.cpp

Issue 2411243004: [WeakMemoryCache] Remove LRU lists, prune order control and live/dead distinction (Closed)
Patch Set: Reflect yhirano's comment Created 4 years, 1 month 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 | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebCache.cpp
diff --git a/third_party/WebKit/Source/web/WebCache.cpp b/third_party/WebKit/Source/web/WebCache.cpp
index cbd168fdc5570a5cde8811061318207d811e524e..92fc2d8f287ab32d73d90272f17c071500cf9a22 100644
--- a/third_party/WebKit/Source/web/WebCache.cpp
+++ b/third_party/WebKit/Source/web/WebCache.cpp
@@ -40,18 +40,16 @@ static void ToResourceTypeStat(const MemoryCache::TypeStatistic& from,
WebCache::ResourceTypeStat& to) {
to.count = from.count;
to.size = from.size;
- to.liveSize = from.liveSize;
+ // TODO(hiroshige): remove |liveSize| as it is no longer meaningful.
+ to.liveSize = from.size;
to.decodedSize = from.decodedSize;
}
-void WebCache::setCapacities(size_t minDeadCapacity,
- size_t maxDeadCapacity,
- size_t capacity) {
+// TODO(hiroshige): remove parameters that are no longer meaningful.
+void WebCache::setCapacities(size_t, size_t, size_t capacity) {
MemoryCache* cache = memoryCache();
if (cache)
- cache->setCapacities(static_cast<unsigned>(minDeadCapacity),
- static_cast<unsigned>(maxDeadCapacity),
- static_cast<unsigned>(capacity));
+ cache->setCapacity(static_cast<unsigned>(capacity));
}
void WebCache::clear() {
@@ -65,11 +63,12 @@ void WebCache::getUsageStats(UsageStats* result) {
MemoryCache* cache = memoryCache();
if (cache) {
- result->minDeadCapacity = cache->minDeadCapacity();
- result->maxDeadCapacity = cache->maxDeadCapacity();
+ // TODO(hiroshige): remove members that are no longer meaningful.
+ result->minDeadCapacity = 0;
+ result->maxDeadCapacity = 0;
result->capacity = cache->capacity();
- result->liveSize = cache->liveSize();
- result->deadSize = cache->deadSize();
+ result->liveSize = cache->size();
+ result->deadSize = 0;
} else
memset(result, 0, sizeof(UsageStats));
}
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698