| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 int CalculateSizeOfEntriesBetween( | 115 int CalculateSizeOfEntriesBetween( |
| 116 base::Time initial_time, | 116 base::Time initial_time, |
| 117 base::Time end_time, | 117 base::Time end_time, |
| 118 const CompletionCallback& callback) override; | 118 const CompletionCallback& callback) override; |
| 119 std::unique_ptr<Iterator> CreateIterator() override; | 119 std::unique_ptr<Iterator> CreateIterator() override; |
| 120 void GetStats(base::StringPairs* stats) override; | 120 void GetStats(base::StringPairs* stats) override; |
| 121 void OnExternalCacheHit(const std::string& key) override; | 121 void OnExternalCacheHit(const std::string& key) override; |
| 122 size_t DumpMemoryStats( | 122 size_t DumpMemoryStats( |
| 123 base::trace_event::ProcessMemoryDump* pmd, | 123 base::trace_event::ProcessMemoryDump* pmd, |
| 124 const std::string& parent_absolute_name) const override; | 124 const std::string& parent_absolute_name) const override; |
| 125 uint8_t GetEntryInMemoryData(const std::string& key) override; |
| 126 void SetEntryInMemoryData(const std::string& key, uint8_t data) override; |
| 125 | 127 |
| 126 private: | 128 private: |
| 127 class SimpleIterator; | 129 class SimpleIterator; |
| 128 friend class SimpleIterator; | 130 friend class SimpleIterator; |
| 129 | 131 |
| 130 using EntryMap = std::unordered_map<uint64_t, SimpleEntryImpl*>; | 132 using EntryMap = std::unordered_map<uint64_t, SimpleEntryImpl*>; |
| 131 | 133 |
| 132 using InitializeIndexCallback = | 134 using InitializeIndexCallback = |
| 133 base::Callback<void(base::Time mtime, uint64_t max_size, int result)>; | 135 base::Callback<void(base::Time mtime, uint64_t max_size, int result)>; |
| 134 | 136 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // operations to be run at the completion of the Doom. | 237 // operations to be run at the completion of the Doom. |
| 236 std::unordered_map<uint64_t, std::vector<base::Closure>> | 238 std::unordered_map<uint64_t, std::vector<base::Closure>> |
| 237 entries_pending_doom_; | 239 entries_pending_doom_; |
| 238 | 240 |
| 239 net::NetLog* const net_log_; | 241 net::NetLog* const net_log_; |
| 240 }; | 242 }; |
| 241 | 243 |
| 242 } // namespace disk_cache | 244 } // namespace disk_cache |
| 243 | 245 |
| 244 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ | 246 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ |
| OLD | NEW |