summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/entry_impl.h
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-19 20:59:27 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-19 20:59:27 +0000
commit2a65aceb8e3ed63fecf62191ef6fb64d257bf484 (patch)
tree5f27b5c30f11f32cb8ca87126ef744d637c14590 /net/disk_cache/entry_impl.h
parenta18c4a5c9a056a2f49eccf360d141c215c85d053 (diff)
downloadchromium_src-2a65aceb8e3ed63fecf62191ef6fb64d257bf484.zip
chromium_src-2a65aceb8e3ed63fecf62191ef6fb64d257bf484.tar.gz
chromium_src-2a65aceb8e3ed63fecf62191ef6fb64d257bf484.tar.bz2
base::Bind: Convert most of disk_cache.
BUG=none TEST=none R=csilv Review URL: http://codereview.chromium.org/8963030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115019 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/entry_impl.h')
-rw-r--r--net/disk_cache/entry_impl.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/net/disk_cache/entry_impl.h b/net/disk_cache/entry_impl.h
index 62ec9d7..3083b23 100644
--- a/net/disk_cache/entry_impl.h
+++ b/net/disk_cache/entry_impl.h
@@ -40,16 +40,16 @@ class NET_EXPORT_PRIVATE EntryImpl
// Background implementation of the Entry interface.
void DoomImpl();
int ReadDataImpl(int index, int offset, net::IOBuffer* buf, int buf_len,
- OldCompletionCallback* callback);
+ const net::CompletionCallback& callback);
int WriteDataImpl(int index, int offset, net::IOBuffer* buf, int buf_len,
- OldCompletionCallback* callback, bool truncate);
+ const net::CompletionCallback& callback, bool truncate);
int ReadSparseDataImpl(int64 offset, net::IOBuffer* buf, int buf_len,
- OldCompletionCallback* callback);
+ const net::CompletionCallback& callback);
int WriteSparseDataImpl(int64 offset, net::IOBuffer* buf, int buf_len,
- OldCompletionCallback* callback);
+ const net::CompletionCallback& callback);
int GetAvailableRangeImpl(int64 offset, int len, int64* start);
void CancelSparseIOImpl();
- int ReadyForSparseIOImpl(OldCompletionCallback* callback);
+ int ReadyForSparseIOImpl(const net::CompletionCallback& callback);
inline CacheEntryBlock* entry() {
return &entry_;
@@ -148,22 +148,23 @@ class NET_EXPORT_PRIVATE EntryImpl
virtual int32 GetDataSize(int index) const OVERRIDE;
virtual int ReadData(
int index, int offset, net::IOBuffer* buf, int buf_len,
- net::OldCompletionCallback* completion_callback) OVERRIDE;
+ const net::CompletionCallback& callback) OVERRIDE;
virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
- net::OldCompletionCallback* completion_callback,
+ const net::CompletionCallback& callback,
bool truncate) OVERRIDE;
virtual int ReadSparseData(
int64 offset, net::IOBuffer* buf, int buf_len,
- net::OldCompletionCallback* completion_callback) OVERRIDE;
+ const net::CompletionCallback& callback) OVERRIDE;
virtual int WriteSparseData(
int64 offset, net::IOBuffer* buf, int buf_len,
- net::OldCompletionCallback* completion_callback) OVERRIDE;
- virtual int GetAvailableRange(int64 offset, int len, int64* start,
- OldCompletionCallback* callback) OVERRIDE;
+ const net::CompletionCallback& callback) OVERRIDE;
+ virtual int GetAvailableRange(
+ int64 offset, int len, int64* start,
+ const net::CompletionCallback& callback) OVERRIDE;
virtual bool CouldBeSparse() const OVERRIDE;
virtual void CancelSparseIO() OVERRIDE;
virtual int ReadyForSparseIO(
- net::OldCompletionCallback* completion_callback) OVERRIDE;
+ const net::CompletionCallback& callback) OVERRIDE;
private:
enum {
@@ -176,9 +177,9 @@ class NET_EXPORT_PRIVATE EntryImpl
// Do all the work for ReadDataImpl and WriteDataImpl. Implemented as
// separate functions to make logging of results simpler.
int InternalReadData(int index, int offset, net::IOBuffer* buf,
- int buf_len, OldCompletionCallback* callback);
+ int buf_len, const net::CompletionCallback& callback);
int InternalWriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
- OldCompletionCallback* callback, bool truncate);
+ const net::CompletionCallback& callback, bool truncate);
// Initializes the storage for an internal or external data block.
bool CreateDataBlock(int index, int size);