| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |