Index: base/containers/mru_cache.h |
diff --git a/base/containers/mru_cache.h b/base/containers/mru_cache.h |
index e59e909839165e9fd9cd1b1f106e35736ecd01a5..ed1bd306800e2eb59faacec7b41b5299f150ce47 100644 |
--- a/base/containers/mru_cache.h |
+++ b/base/containers/mru_cache.h |
@@ -132,6 +132,13 @@ class MRUCacheBase { |
return index_iter->second; |
} |
+ const_iterator Peek(const KeyType& key) const { |
+ typename KeyIndex::const_iterator index_iter = index_.find(key); |
+ if (index_iter == index_.end()) |
+ return end(); |
+ return index_iter->second; |
+ } |
+ |
// Erases the item referenced by the given iterator. An iterator to the item |
// following it will be returned. The iterator must be valid. |
iterator Erase(iterator pos) { |