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

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: fix an actual bug in DoomEntry 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
« no previous file with comments | « net/disk_cache/simple/simple_index.cc ('k') | net/disk_cache/simple/simple_synchronous_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5cdf449e439054c3a71011aa7fdc5b37641ba431..5baea07e4182c54c935aa59884f39dc0738d0c82 100644
--- a/net/disk_cache/simple/simple_synchronous_entry.h
+++ b/net/disk_cache/simple/simple_synchronous_entry.h
@@ -6,10 +6,12 @@
#define NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_
#include <string>
+#include <vector>
#include "base/callback_forward.h"
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/platform_file.h"
#include "base/task_runner.h"
#include "base/time.h"
@@ -63,6 +65,13 @@ class SimpleSynchronousEntry {
base::SingleThreadTaskRunner* 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::vector<uint64> > key_hashes,
+ const base::FilePath& path,
+ base::SingleThreadTaskRunner* callback_runner,
+ const net::CompletionCallback& callback);
+
// N.B. Close(), ReadData() and WriteData() may block on IO.
void Close();
void ReadData(int index,
@@ -106,6 +115,9 @@ class SimpleSynchronousEntry {
void Doom();
+ static bool DeleteFilesForEntry(const base::FilePath& path,
+ const std::string& key);
+
scoped_refptr<base::SingleThreadTaskRunner> callback_runner_;
const base::FilePath path_;
const std::string key_;
« no previous file with comments | « net/disk_cache/simple/simple_index.cc ('k') | net/disk_cache/simple/simple_synchronous_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698