diff options
Diffstat (limited to 'chromium/base/containers/mru_cache.h')
-rw-r--r-- | chromium/base/containers/mru_cache.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/chromium/base/containers/mru_cache.h b/chromium/base/containers/mru_cache.h index 4a9f44e868e..fac49e909af 100644 --- a/chromium/base/containers/mru_cache.h +++ b/chromium/base/containers/mru_cache.h @@ -25,8 +25,7 @@ #include <unordered_map> #include <utility> -#include "base/logging.h" -#include "base/macros.h" +#include "base/check.h" namespace base { namespace trace_event { @@ -82,6 +81,9 @@ class MRUCacheBase { // can pass NO_AUTO_EVICT to not restrict the cache size. explicit MRUCacheBase(size_type max_size) : max_size_(max_size) {} + MRUCacheBase(const MRUCacheBase&) = delete; + MRUCacheBase& operator=(const MRUCacheBase&) = delete; + virtual ~MRUCacheBase() = default; size_type max_size() const { return max_size_; } @@ -211,8 +213,6 @@ class MRUCacheBase { KeyIndex index_; size_type max_size_; - - DISALLOW_COPY_AND_ASSIGN(MRUCacheBase); }; // MRUCache -------------------------------------------------------------------- @@ -230,10 +230,9 @@ class MRUCache : public MRUCacheBase<KeyType, PayloadType, CompareType> { // See MRUCacheBase, noting the possibility of using NO_AUTO_EVICT. explicit MRUCache(typename ParentType::size_type max_size) : ParentType(max_size) {} - virtual ~MRUCache() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(MRUCache); + MRUCache(const MRUCache&) = delete; + MRUCache& operator=(const MRUCache&) = delete; + ~MRUCache() override = default; }; // HashingMRUCache ------------------------------------------------------------ @@ -257,10 +256,9 @@ class HashingMRUCache // See MRUCacheBase, noting the possibility of using NO_AUTO_EVICT. explicit HashingMRUCache(typename ParentType::size_type max_size) : ParentType(max_size) {} - virtual ~HashingMRUCache() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(HashingMRUCache); + HashingMRUCache(const HashingMRUCache&) = delete; + HashingMRUCache& operator=(const HashingMRUCache&) = delete; + ~HashingMRUCache() override = default; }; } // namespace base |