| Index: net/http/mock_http_cache.h
|
| diff --git a/net/http/mock_http_cache.h b/net/http/mock_http_cache.h
|
| index 975058f309e75a3284ec645356999d4136ee32d9..00b5cae8720f5864a1c84838639cbd268a02edf6 100644
|
| --- a/net/http/mock_http_cache.h
|
| +++ b/net/http/mock_http_cache.h
|
| @@ -35,9 +35,14 @@ class MockDiskEntry : public disk_cache::Entry,
|
| virtual int32 GetDataSize(int index) const OVERRIDE;
|
| virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len,
|
| net::OldCompletionCallback* callback) OVERRIDE;
|
| + virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len,
|
| + const net::CompletionCallback& callback) OVERRIDE;
|
| virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
|
| net::OldCompletionCallback* callback,
|
| bool truncate) OVERRIDE;
|
| + virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
|
| + const net::CompletionCallback& callback,
|
| + bool truncate) OVERRIDE;
|
| virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
|
| net::OldCompletionCallback* callback) OVERRIDE;
|
| virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
|
| @@ -67,13 +72,16 @@ class MockDiskEntry : public disk_cache::Entry,
|
| // if the consumer called Close on the MockDiskEntry. We achieve that by
|
| // leveraging the fact that this class is reference counted.
|
| void CallbackLater(net::OldCompletionCallback* callback, int result);
|
| + void CallbackLater(const net::CompletionCallback& callback, int result);
|
|
|
| - void RunCallback(net::OldCompletionCallback* callback, int result);
|
| + void RunOldCallback(net::OldCompletionCallback* callback, int result);
|
| + void RunCallback(const net::CompletionCallback& callback, int result);
|
|
|
| // When |store| is true, stores the callback to be delivered later; otherwise
|
| // delivers any callback previously stored.
|
| static void StoreAndDeliverCallbacks(bool store, MockDiskEntry* entry,
|
| - net::OldCompletionCallback* callback,
|
| + net::OldCompletionCallback* old_callback,
|
| + const net::CompletionCallback& callback,
|
| int result);
|
|
|
| static const int kNumCacheEntryDataIndices = 3;
|
| @@ -98,8 +106,12 @@ class MockDiskCache : public disk_cache::Backend {
|
| virtual int32 GetEntryCount() const OVERRIDE;
|
| virtual int OpenEntry(const std::string& key, disk_cache::Entry** entry,
|
| net::OldCompletionCallback* callback) OVERRIDE;
|
| + virtual int OpenEntry(const std::string& key, disk_cache::Entry** entry,
|
| + const net::CompletionCallback& callback) OVERRIDE;
|
| virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
|
| net::OldCompletionCallback* callback) OVERRIDE;
|
| + virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
|
| + const net::CompletionCallback& callback) OVERRIDE;
|
| virtual int DoomEntry(const std::string& key,
|
| net::OldCompletionCallback* callback) OVERRIDE;
|
| virtual int DoomAllEntries(net::OldCompletionCallback* callback) OVERRIDE;
|
| @@ -134,9 +146,9 @@ class MockDiskCache : public disk_cache::Backend {
|
|
|
| private:
|
| typedef base::hash_map<std::string, MockDiskEntry*> EntryMap;
|
| - class CallbackRunner;
|
|
|
| void CallbackLater(net::OldCompletionCallback* callback, int result);
|
| + void CallbackLater(const net::CompletionCallback& callback, int result);
|
|
|
| EntryMap entries_;
|
| int open_count_;
|
|
|