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

Unified Diff: net/disk_cache/in_flight_backend_io.h

Issue 8794003: base::Bind: Convert disk_cache_based_ssl_host_info. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test fix. Created 9 years 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/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,

Powered by Google App Engine
This is Rietveld 408576698