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

Unified Diff: net/tools/dump_cache/cache_dumper.h

Issue 11299239: Adding a simple class for dumping the contents of a cache. Use this new class in dump_cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 1 month 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/net.gyp ('k') | net/tools/dump_cache/cache_dumper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/dump_cache/cache_dumper.h
diff --git a/net/tools/dump_cache/cache_dumper.h b/net/tools/dump_cache/cache_dumper.h
index 1c0c7c2f28ec5907760b27cfb32a202c5a35b42a..daca8feafb1f87d7b5bb2527608ded413beb7997 100644
--- a/net/tools/dump_cache/cache_dumper.h
+++ b/net/tools/dump_cache/cache_dumper.h
@@ -46,15 +46,15 @@ class CacheDumpWriter {
// Writes data to a cache.
class CacheDumper : public CacheDumpWriter {
public:
- explicit CacheDumper(disk_cache::Backend* cache) : cache_(cache) {}
+ explicit CacheDumper(disk_cache::Backend* cache);
virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
- const net::CompletionCallback& callback);
+ const net::CompletionCallback& callback) OVERRIDE;
virtual int WriteEntry(disk_cache::Entry* entry, int stream, int offset,
net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback);
+ const net::CompletionCallback& callback) OVERRIDE;
virtual void CloseEntry(disk_cache::Entry* entry, base::Time last_used,
- base::Time last_modified);
+ base::Time last_modified) OVERRIDE;
private:
disk_cache::Backend* cache_;
@@ -63,16 +63,15 @@ class CacheDumper : public CacheDumpWriter {
// Writes data to a disk.
class DiskDumper : public CacheDumpWriter {
public:
- explicit DiskDumper(const FilePath& path) : path_(path), entry_(NULL) {
- file_util::CreateDirectory(path);
- }
+ explicit DiskDumper(const FilePath& path);
+
virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
- const net::CompletionCallback& callback);
+ const net::CompletionCallback& callback) OVERRIDE;
virtual int WriteEntry(disk_cache::Entry* entry, int stream, int offset,
net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback);
+ const net::CompletionCallback& callback) OVERRIDE;
virtual void CloseEntry(disk_cache::Entry* entry, base::Time last_used,
- base::Time last_modified);
+ base::Time last_modified) OVERRIDE;
private:
FilePath path_;
« no previous file with comments | « net/net.gyp ('k') | net/tools/dump_cache/cache_dumper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698