Index: net/disk_cache/in_flight_backend_io.h |
diff --git a/net/disk_cache/in_flight_backend_io.h b/net/disk_cache/in_flight_backend_io.h |
index 17efb1a5c12d4c35356ee87bd3b37ec976d7eade..96dc3e455118f68b073c6f731058af91002a1f5d 100644 |
--- a/net/disk_cache/in_flight_backend_io.h |
+++ b/net/disk_cache/in_flight_backend_io.h |
@@ -27,6 +27,8 @@ class BackendIO : public BackgroundIO { |
public: |
BackendIO(InFlightIO* controller, BackendImpl* backend, |
net::OldCompletionCallback* callback); |
+ BackendIO(InFlightIO* controller, BackendImpl* backend, |
+ const net::CompletionCallback& callback); |
// Runs the actual operation on the background thread. |
void ExecuteOperation(); |
@@ -37,7 +39,8 @@ class BackendIO : public BackgroundIO { |
// Returns true if this operation is directed to an entry (vs. the backend). |
bool IsEntryOperation(); |
- net::OldCompletionCallback* callback() { return callback_; } |
+ net::OldCompletionCallback* old_callback() const { return old_callback_; } |
+ net::CompletionCallback callback() const { return callback_; } |
// Grabs an extra reference of entry_. |
void ReferenceEntry(); |
@@ -113,7 +116,8 @@ class BackendIO : public BackgroundIO { |
void ExecuteEntryOperation(); |
BackendImpl* backend_; |
- net::OldCompletionCallback* callback_; |
+ net::OldCompletionCallback* old_callback_; |
+ net::CompletionCallback callback_; |
Operation operation_; |
net::OldCompletionCallbackImpl<BackendIO> my_callback_; |
@@ -149,8 +153,12 @@ class InFlightBackendIO : public InFlightIO { |
void Init(net::OldCompletionCallback* callback); |
void OpenEntry(const std::string& key, Entry** entry, |
net::OldCompletionCallback* callback); |
+ void OpenEntry(const std::string& key, Entry** entry, |
+ const net::CompletionCallback& callback); |
void CreateEntry(const std::string& key, Entry** entry, |
net::OldCompletionCallback* callback); |
+ void CreateEntry(const std::string& key, Entry** entry, |
+ const net::CompletionCallback& callback); |
void DoomEntry(const std::string& key, net::OldCompletionCallback* callback); |
void DoomAllEntries(net::OldCompletionCallback* callback); |
void DoomEntriesBetween(const base::Time initial_time, |
@@ -170,8 +178,14 @@ class InFlightBackendIO : public InFlightIO { |
void RunTask(Task* task, net::OldCompletionCallback* callback); |
void ReadData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf, |
int buf_len, net::OldCompletionCallback* callback); |
- void WriteData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf, |
- int buf_len, bool truncate, net::OldCompletionCallback* callback); |
+ void ReadData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf, |
+ int buf_len, const net::CompletionCallback& callback); |
+ void WriteData(EntryImpl* entry, int index, int offset, |
+ net::IOBuffer* buf, int buf_len, bool truncate, |
+ net::OldCompletionCallback* callback); |
+ void WriteData(EntryImpl* entry, int index, int offset, |
+ net::IOBuffer* buf, int buf_len, bool truncate, |
+ const net::CompletionCallback& callback); |
void ReadSparseData(EntryImpl* entry, int64 offset, net::IOBuffer* buf, |
int buf_len, net::OldCompletionCallback* callback); |
void WriteSparseData(EntryImpl* entry, int64 offset, net::IOBuffer* buf, |