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

Unified Diff: base/containers/mru_cache_unittest.cc

Issue 2258713003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 | « no previous file | base/debug/activity_analyzer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/containers/mru_cache_unittest.cc
diff --git a/base/containers/mru_cache_unittest.cc b/base/containers/mru_cache_unittest.cc
index 99b14d1ab5df59923a7133363b5f0c0f5fcca037..f84fe0db78ec3fcc2dd49eb78e40ba7e46086f67 100644
--- a/base/containers/mru_cache_unittest.cc
+++ b/base/containers/mru_cache_unittest.cc
@@ -245,10 +245,10 @@ TEST(MRUCacheTest, AutoEvict) {
Cache cache(kMaxSize);
static const int kItem1Key = 1, kItem2Key = 2, kItem3Key = 3, kItem4Key = 4;
- cache.Put(kItem1Key, WrapUnique(new CachedItem(20)));
- cache.Put(kItem2Key, WrapUnique(new CachedItem(21)));
- cache.Put(kItem3Key, WrapUnique(new CachedItem(22)));
- cache.Put(kItem4Key, WrapUnique(new CachedItem(23)));
+ cache.Put(kItem1Key, MakeUnique<CachedItem>(20));
+ cache.Put(kItem2Key, MakeUnique<CachedItem>(21));
+ cache.Put(kItem3Key, MakeUnique<CachedItem>(22));
+ cache.Put(kItem4Key, MakeUnique<CachedItem>(23));
// The cache should only have kMaxSize items in it even though we inserted
// more.
« no previous file with comments | « no previous file | base/debug/activity_analyzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698