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

Unified Diff: net/disk_cache/simple/simple_synchronous_entry.h

Issue 14295013: Simple Cache: DoomEntriesBetween() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: first round of comments Created 7 years, 8 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
Index: net/disk_cache/simple/simple_synchronous_entry.h
diff --git a/net/disk_cache/simple/simple_synchronous_entry.h b/net/disk_cache/simple/simple_synchronous_entry.h
index f91262cb6a7683c34010e05c461b597ff1522347..aa86dda1128f123ca5b5d5dde0f15b5e8172003f 100644
--- a/net/disk_cache/simple/simple_synchronous_entry.h
+++ b/net/disk_cache/simple/simple_synchronous_entry.h
@@ -5,6 +5,7 @@
#ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_
#define NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_
+#include <set>
#include <string>
#include "base/callback_forward.h"
@@ -63,6 +64,13 @@ class SimpleSynchronousEntry {
const scoped_refptr<base::TaskRunner>& callback_runner,
const net::CompletionCallback& callback);
+ // Like |DoomEntry()| above. Deletes all entries corresponding to the
+ // |key_hashes|. Succeeds only when all entries are deleted.
+ static void DoomEntrySet(scoped_ptr<std::set<uint64> > key_hashes,
+ const base::FilePath& path,
+ scoped_refptr<base::TaskRunner> callback_runner,
+ const net::CompletionCallback& callback);
+
// N.B. Close(), ReadData() and WriteData() may block on IO.
void Close();
void ReadData(int index,
@@ -106,6 +114,9 @@ class SimpleSynchronousEntry {
void Doom();
+ static bool DeleteFilesForEntry(const base::FilePath& path,
+ const std::string& key);
+
scoped_refptr<base::TaskRunner> callback_runner_;
const base::FilePath path_;
const std::string key_;

Powered by Google App Engine
This is Rietveld 408576698