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

Unified Diff: net/disk_cache/simple/simple_backend_impl.cc

Issue 2957133002: Implement in-memory byte hints in SimpleCache (Closed)
Patch Set: Adjust to the interface's naming change. Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/simple/simple_backend_impl.h ('k') | net/disk_cache/simple/simple_backend_version.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_backend_impl.cc
diff --git a/net/disk_cache/simple/simple_backend_impl.cc b/net/disk_cache/simple/simple_backend_impl.cc
index 68550fb534b73a2446d06f8d7b1c06c084b0993c..9abe46df4ebc7c88c15bace27234b6fa6889fd5c 100644
--- a/net/disk_cache/simple/simple_backend_impl.cc
+++ b/net/disk_cache/simple/simple_backend_impl.cc
@@ -594,6 +594,17 @@ size_t SimpleBackendImpl::DumpMemoryStats(
return size;
}
+uint8_t SimpleBackendImpl::GetEntryInMemoryData(const std::string& key) {
+ const uint64_t entry_hash = simple_util::GetEntryHashKey(key);
+ return index_->GetEntryInMemoryData(entry_hash);
+}
+
+void SimpleBackendImpl::SetEntryInMemoryData(const std::string& key,
+ uint8_t data) {
+ const uint64_t entry_hash = simple_util::GetEntryHashKey(key);
+ index_->SetEntryInMemoryData(entry_hash, data);
+}
+
void SimpleBackendImpl::InitializeIndex(const CompletionCallback& callback,
const DiskStatResult& result) {
if (result.net_error == net::OK) {
« no previous file with comments | « net/disk_cache/simple/simple_backend_impl.h ('k') | net/disk_cache/simple/simple_backend_version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698