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

Side by Side Diff: net/disk_cache/simple/simple_backend_impl.h

Issue 2922973003: RFC: use some in-memory state in SimpleCache to quickly cache-miss some CantConditionalize cases
Patch Set: - Implement support for oracle bytes in MockHttpCache, so the code actually gets exercised in tests… Created 3 years, 6 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
OLDNEW
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // SimpleIndexDelegate: 91 // SimpleIndexDelegate:
92 void DoomEntries(std::vector<uint64_t>* entry_hashes, 92 void DoomEntries(std::vector<uint64_t>* entry_hashes,
93 const CompletionCallback& callback) override; 93 const CompletionCallback& callback) override;
94 94
95 // Backend: 95 // Backend:
96 net::CacheType GetCacheType() const override; 96 net::CacheType GetCacheType() const override;
97 int32_t GetEntryCount() const override; 97 int32_t GetEntryCount() const override;
98 int OpenEntry(const std::string& key, 98 int OpenEntry(const std::string& key,
99 Entry** entry, 99 Entry** entry,
100 const CompletionCallback& callback) override; 100 const CompletionCallback& callback) override;
101 int OpenEntryWithOracleByte(const std::string& key,
102 Entry** entry,
103 const OracleCallback& oracle,
104 const CompletionCallback& callback) override;
101 int CreateEntry(const std::string& key, 105 int CreateEntry(const std::string& key,
102 Entry** entry, 106 Entry** entry,
103 const CompletionCallback& callback) override; 107 const CompletionCallback& callback) override;
104 int DoomEntry(const std::string& key, 108 int DoomEntry(const std::string& key,
105 const CompletionCallback& callback) override; 109 const CompletionCallback& callback) override;
106 int DoomAllEntries(const CompletionCallback& callback) override; 110 int DoomAllEntries(const CompletionCallback& callback) override;
107 int DoomEntriesBetween(base::Time initial_time, 111 int DoomEntriesBetween(base::Time initial_time,
108 base::Time end_time, 112 base::Time end_time,
109 const CompletionCallback& callback) override; 113 const CompletionCallback& callback) override;
110 int DoomEntriesSince(base::Time initial_time, 114 int DoomEntriesSince(base::Time initial_time,
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // operations to be run at the completion of the Doom. 234 // operations to be run at the completion of the Doom.
231 std::unordered_map<uint64_t, std::vector<base::Closure>> 235 std::unordered_map<uint64_t, std::vector<base::Closure>>
232 entries_pending_doom_; 236 entries_pending_doom_;
233 237
234 net::NetLog* const net_log_; 238 net::NetLog* const net_log_;
235 }; 239 };
236 240
237 } // namespace disk_cache 241 } // namespace disk_cache
238 242
239 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ 243 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698