| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ | 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ |
| 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ | 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 int DoomEntriesSince(base::Time initial_time, | 110 int DoomEntriesSince(base::Time initial_time, |
| 111 const CompletionCallback& callback) override; | 111 const CompletionCallback& callback) override; |
| 112 int CalculateSizeOfAllEntries(const CompletionCallback& callback) override; | 112 int CalculateSizeOfAllEntries(const CompletionCallback& callback) override; |
| 113 int CalculateSizeOfEntriesBetween( | 113 int CalculateSizeOfEntriesBetween( |
| 114 base::Time initial_time, | 114 base::Time initial_time, |
| 115 base::Time end_time, | 115 base::Time end_time, |
| 116 const CompletionCallback& callback) override; | 116 const CompletionCallback& callback) override; |
| 117 std::unique_ptr<Iterator> CreateIterator() override; | 117 std::unique_ptr<Iterator> CreateIterator() override; |
| 118 void GetStats(base::StringPairs* stats) override; | 118 void GetStats(base::StringPairs* stats) override; |
| 119 void OnExternalCacheHit(const std::string& key) override; | 119 void OnExternalCacheHit(const std::string& key) override; |
| 120 size_t EstimateMemoryUsage() const override; |
| 120 | 121 |
| 121 private: | 122 private: |
| 122 class SimpleIterator; | 123 class SimpleIterator; |
| 123 friend class SimpleIterator; | 124 friend class SimpleIterator; |
| 124 | 125 |
| 125 using EntryMap = std::unordered_map<uint64_t, SimpleEntryImpl*>; | 126 using EntryMap = std::unordered_map<uint64_t, SimpleEntryImpl*>; |
| 126 | 127 |
| 127 using InitializeIndexCallback = | 128 using InitializeIndexCallback = |
| 128 base::Callback<void(base::Time mtime, uint64_t max_size, int result)>; | 129 base::Callback<void(base::Time mtime, uint64_t max_size, int result)>; |
| 129 | 130 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 // operations to be run at the completion of the Doom. | 228 // operations to be run at the completion of the Doom. |
| 228 std::unordered_map<uint64_t, std::vector<base::Closure>> | 229 std::unordered_map<uint64_t, std::vector<base::Closure>> |
| 229 entries_pending_doom_; | 230 entries_pending_doom_; |
| 230 | 231 |
| 231 net::NetLog* const net_log_; | 232 net::NetLog* const net_log_; |
| 232 }; | 233 }; |
| 233 | 234 |
| 234 } // namespace disk_cache | 235 } // namespace disk_cache |
| 235 | 236 |
| 236 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ | 237 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ |
| OLD | NEW |