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

Side by Side Diff: ios/chrome/browser/favicon/large_icon_cache.h

Issue 1763273002: base: Remove OwningMRUCache in favor of scoped_ptrs in MRUCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + fix Created 4 years, 9 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_CHROME_BROWSER_FAVICON_LARGE_ICON_CACHE_H_ 5 #ifndef IOS_CHROME_BROWSER_FAVICON_LARGE_ICON_CACHE_H_
6 #define IOS_CHROME_BROWSER_FAVICON_LARGE_ICON_CACHE_H_ 6 #define IOS_CHROME_BROWSER_FAVICON_LARGE_ICON_CACHE_H_
7 7
8 #include "base/containers/mru_cache.h" 8 #include "base/containers/mru_cache.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 29 matching lines...) Expand all
40 void SetCachedResult(const GURL& url, const favicon_base::LargeIconResult&); 40 void SetCachedResult(const GURL& url, const favicon_base::LargeIconResult&);
41 41
42 // Returns a cached LargeIconResult. 42 // Returns a cached LargeIconResult.
43 scoped_ptr<favicon_base::LargeIconResult> GetCachedResult(const GURL& url); 43 scoped_ptr<favicon_base::LargeIconResult> GetCachedResult(const GURL& url);
44 44
45 private: 45 private:
46 // Clones a LargeIconResult. 46 // Clones a LargeIconResult.
47 scoped_ptr<favicon_base::LargeIconResult> CloneLargeIconResult( 47 scoped_ptr<favicon_base::LargeIconResult> CloneLargeIconResult(
48 const favicon_base::LargeIconResult& large_icon_result); 48 const favicon_base::LargeIconResult& large_icon_result);
49 49
50 base::OwningMRUCache<GURL, LargeIconCacheEntry*> cache_; 50 base::MRUCache<GURL, scoped_ptr<LargeIconCacheEntry>> cache_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(LargeIconCache); 52 DISALLOW_COPY_AND_ASSIGN(LargeIconCache);
53 }; 53 };
54 54
55 #endif // IOS_CHROME_BROWSER_FAVICON_LARGE_ICON_CACHE_H_ 55 #endif // IOS_CHROME_BROWSER_FAVICON_LARGE_ICON_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698