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

Issue 1868353003: Add an LRUBoundedCache class. (Closed)

Created:
4 years, 8 months ago by palmer
Modified:
4 years, 8 months ago
Reviewers:
mmenke
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add an LRUBoundedCache class. This class is simpler to use than media/blink/lru.h for the purpose of bounding the memory usage of a simple cache. ios/chrome/browser/snapshots/lru_cache.h performs the same job as this class, but is in Objective-C++ for iOS; in a future CL, this class could potentially replace the Objective-C++ code. BUG=598899

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -0 lines) Patch
M base/base.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gypi View 1 chunk +1 line, -0 lines 0 comments Download
A base/lru_bounded_cache.h View 1 chunk +65 lines, -0 lines 0 comments Download
A base/lru_bounded_cache_unittest.cc View 1 chunk +36 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
palmer
See if you think this makes any sense. Thanks!
4 years, 8 months ago (2016-04-09 00:27:51 UTC) #3
mmenke
On 2016/04/09 00:27:51, palmer wrote: > See if you think this makes any sense. Thanks! ...
4 years, 8 months ago (2016-04-11 16:12:25 UTC) #4
palmer
4 years, 8 months ago (2016-04-11 21:50:58 UTC) #5
> Going to hold off on this review until we've decided if
> base/containers/mru_cache.h will work for our use case.

Ahh, very good, I hadn't seen that. I think I need to add a Contains member
function, and for space-efficiency we might want to make a std::set variant.
I'll fire up a CL for that, and close this one. Thanks!

Powered by Google App Engine
This is Rietveld 408576698