| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 NET_BASE_EXPIRING_CACHE_H_ | 5 #ifndef NET_BASE_EXPIRING_CACHE_H_ |
| 6 #define NET_BASE_EXPIRING_CACHE_H_ | 6 #define NET_BASE_EXPIRING_CACHE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include <map> | 10 #include <map> |
| 9 #include <utility> | 11 #include <utility> |
| 10 | 12 |
| 11 #include "base/basictypes.h" | |
| 12 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/macros.h" |
| 13 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 14 | 16 |
| 15 namespace net { | 17 namespace net { |
| 16 | 18 |
| 17 template <typename KeyType, | 19 template <typename KeyType, |
| 18 typename ValueType, | 20 typename ValueType, |
| 19 typename ExpirationType> | 21 typename ExpirationType> |
| 20 class NoopEvictionHandler { | 22 class NoopEvictionHandler { |
| 21 public: | 23 public: |
| 22 void Handle(const KeyType& key, | 24 void Handle(const KeyType& key, |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 EntryMap entries_; | 211 EntryMap entries_; |
| 210 ExpirationCompare expiration_comp_; | 212 ExpirationCompare expiration_comp_; |
| 211 EvictionHandler eviction_handler_; | 213 EvictionHandler eviction_handler_; |
| 212 | 214 |
| 213 DISALLOW_COPY_AND_ASSIGN(ExpiringCache); | 215 DISALLOW_COPY_AND_ASSIGN(ExpiringCache); |
| 214 }; | 216 }; |
| 215 | 217 |
| 216 } // namespace net | 218 } // namespace net |
| 217 | 219 |
| 218 #endif // NET_BASE_EXPIRING_CACHE_H_ | 220 #endif // NET_BASE_EXPIRING_CACHE_H_ |
| OLD | NEW |