Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: net/disk_cache/memory/mem_backend_impl.h

Issue 2626173003: Calculate the size of all cache entries between two points in time. (Closed)
Patch Set: revert cache_storage_cache_unittest.cc Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/disk_cache/disk_cache_test_base.cc ('k') | net/disk_cache/memory/mem_backend_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // See net/disk_cache/disk_cache.h for the public interface of the cache. 5 // See net/disk_cache/disk_cache.h for the public interface of the cache.
6 6
7 #ifndef NET_DISK_CACHE_MEMORY_MEM_BACKEND_IMPL_H_ 7 #ifndef NET_DISK_CACHE_MEMORY_MEM_BACKEND_IMPL_H_
8 #define NET_DISK_CACHE_MEMORY_MEM_BACKEND_IMPL_H_ 8 #define NET_DISK_CACHE_MEMORY_MEM_BACKEND_IMPL_H_
9 9
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 const CompletionCallback& callback) override; 84 const CompletionCallback& callback) override;
85 int DoomEntry(const std::string& key, 85 int DoomEntry(const std::string& key,
86 const CompletionCallback& callback) override; 86 const CompletionCallback& callback) override;
87 int DoomAllEntries(const CompletionCallback& callback) override; 87 int DoomAllEntries(const CompletionCallback& callback) override;
88 int DoomEntriesBetween(base::Time initial_time, 88 int DoomEntriesBetween(base::Time initial_time,
89 base::Time end_time, 89 base::Time end_time,
90 const CompletionCallback& callback) override; 90 const CompletionCallback& callback) override;
91 int DoomEntriesSince(base::Time initial_time, 91 int DoomEntriesSince(base::Time initial_time,
92 const CompletionCallback& callback) override; 92 const CompletionCallback& callback) override;
93 int CalculateSizeOfAllEntries(const CompletionCallback& callback) override; 93 int CalculateSizeOfAllEntries(const CompletionCallback& callback) override;
94 int CalculateSizeOfEntriesBetween(
95 base::Time initial_time,
96 base::Time end_time,
97 const CompletionCallback& callback) override;
94 std::unique_ptr<Iterator> CreateIterator() override; 98 std::unique_ptr<Iterator> CreateIterator() override;
95 void GetStats(base::StringPairs* stats) override {} 99 void GetStats(base::StringPairs* stats) override {}
96 void OnExternalCacheHit(const std::string& key) override; 100 void OnExternalCacheHit(const std::string& key) override;
97 101
98 private: 102 private:
99 class MemIterator; 103 class MemIterator;
100 friend class MemIterator; 104 friend class MemIterator;
101 105
102 using EntryMap = std::unordered_map<std::string, MemEntryImpl*>; 106 using EntryMap = std::unordered_map<std::string, MemEntryImpl*>;
103 107
(...skipping 12 matching lines...) Expand all
116 net::NetLog* net_log_; 120 net::NetLog* net_log_;
117 121
118 base::WeakPtrFactory<MemBackendImpl> weak_factory_; 122 base::WeakPtrFactory<MemBackendImpl> weak_factory_;
119 123
120 DISALLOW_COPY_AND_ASSIGN(MemBackendImpl); 124 DISALLOW_COPY_AND_ASSIGN(MemBackendImpl);
121 }; 125 };
122 126
123 } // namespace disk_cache 127 } // namespace disk_cache
124 128
125 #endif // NET_DISK_CACHE_MEMORY_MEM_BACKEND_IMPL_H_ 129 #endif // NET_DISK_CACHE_MEMORY_MEM_BACKEND_IMPL_H_
OLDNEW
« no previous file with comments | « net/disk_cache/disk_cache_test_base.cc ('k') | net/disk_cache/memory/mem_backend_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698