summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-01 20:38:10 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-01 20:38:10 +0000
commitf1f3f0f8af3740ec2afaebcaed410950a9cc0ac8 (patch)
tree6ccdd87ccfc89adbcb372c517559fa61fbc6c6b2 /webkit
parentd1666539b57bf8552e203d355fd09909d36f9732 (diff)
downloadchromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.zip
chromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.tar.gz
chromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.tar.bz2
Begin CompletionCallback switchover.
Rename CompletionCallback to OldCompletionCallback in preparation for introducing a new CompletionCallback based on base::Callback. Also renames other CompletionCallback types like CancelableCompletionCallback and TestCompletionCallback and CompletionCallbackImpl. All using sed with s/CompletionCallback/OldCompletionCallback/g. BUG=98719 TEST=none Review URL: http://codereview.chromium.org/8070013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/appcache/appcache_disk_cache.cc28
-rw-r--r--webkit/appcache/appcache_disk_cache.h22
-rw-r--r--webkit/appcache/appcache_quota_client.cc2
-rw-r--r--webkit/appcache/appcache_quota_client.h2
-rw-r--r--webkit/appcache/appcache_response.cc36
-rw-r--r--webkit/appcache/appcache_response.h30
-rw-r--r--webkit/appcache/appcache_response_unittest.cc8
-rw-r--r--webkit/appcache/appcache_service.cc26
-rw-r--r--webkit/appcache/appcache_service.h8
-rw-r--r--webkit/appcache/appcache_service_unittest.cc8
-rw-r--r--webkit/appcache/appcache_storage.h2
-rw-r--r--webkit/appcache/appcache_storage_impl.h4
-rw-r--r--webkit/appcache/appcache_test_helper.h2
-rw-r--r--webkit/appcache/appcache_update_job.h8
-rw-r--r--webkit/appcache/appcache_update_job_unittest.cc16
-rw-r--r--webkit/appcache/appcache_url_request_job.h2
-rw-r--r--webkit/appcache/appcache_url_request_job_unittest.cc8
-rw-r--r--webkit/appcache/mock_appcache_service.cc4
-rw-r--r--webkit/appcache/mock_appcache_service.h2
-rw-r--r--webkit/appcache/view_appcache_internals_job.cc10
-rw-r--r--webkit/blob/blob_url_request_job.h2
-rw-r--r--webkit/database/database_quota_client.cc10
-rw-r--r--webkit/database/database_quota_client_unittest.cc4
-rw-r--r--webkit/database/database_tracker.cc14
-rw-r--r--webkit/database/database_tracker.h10
-rw-r--r--webkit/database/database_tracker_unittest.cc2
-rw-r--r--webkit/fileapi/file_system_url_request_job.h2
-rw-r--r--webkit/fileapi/file_writer_delegate.h2
-rw-r--r--webkit/fileapi/webfilewriter_base_unittest.cc2
-rw-r--r--webkit/glue/media/buffered_data_source_unittest.cc8
-rw-r--r--webkit/glue/media/buffered_resource_loader.cc4
-rw-r--r--webkit/glue/media/buffered_resource_loader.h8
-rw-r--r--webkit/plugins/ppapi/ppb_transport_impl.h4
33 files changed, 150 insertions, 150 deletions
diff --git a/webkit/appcache/appcache_disk_cache.cc b/webkit/appcache/appcache_disk_cache.cc
index 4aa3fb5..1f9033b 100644
--- a/webkit/appcache/appcache_disk_cache.cc
+++ b/webkit/appcache/appcache_disk_cache.cc
@@ -21,14 +21,14 @@ class AppCacheDiskCache::EntryImpl : public Entry {
DCHECK(disk_cache_entry);
}
virtual int Read(int index, int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback) {
+ net::OldCompletionCallback* completion_callback) {
if (offset < 0 || offset > kint32max)
return net::ERR_INVALID_ARGUMENT;
return disk_cache_entry_->ReadData(
index, static_cast<int>(offset), buf, buf_len, completion_callback);
}
virtual int Write(int index, int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback) {
+ net::OldCompletionCallback* completion_callback) {
if (offset < 0 || offset > kint32max)
return net::ERR_INVALID_ARGUMENT;
const bool kTruncate = true;
@@ -58,19 +58,19 @@ class AppCacheDiskCache::ActiveCall {
async_completion_(this, &ActiveCall::OnAsyncCompletion)) {
}
- int CreateEntry(int64 key, Entry** entry, net::CompletionCallback* callback) {
+ int CreateEntry(int64 key, Entry** entry, net::OldCompletionCallback* callback) {
int rv = owner_->disk_cache()->CreateEntry(
base::Int64ToString(key), &entry_ptr_, &async_completion_);
return HandleImmediateReturnValue(rv, entry, callback);
}
- int OpenEntry(int64 key, Entry** entry, net::CompletionCallback* callback) {
+ int OpenEntry(int64 key, Entry** entry, net::OldCompletionCallback* callback) {
int rv = owner_->disk_cache()->OpenEntry(
base::Int64ToString(key), &entry_ptr_, &async_completion_);
return HandleImmediateReturnValue(rv, entry, callback);
}
- int DoomEntry(int64 key, net::CompletionCallback* callback) {
+ int DoomEntry(int64 key, net::OldCompletionCallback* callback) {
int rv = owner_->disk_cache()->DoomEntry(
base::Int64ToString(key), &async_completion_);
return HandleImmediateReturnValue(rv, NULL, callback);
@@ -78,7 +78,7 @@ class AppCacheDiskCache::ActiveCall {
private:
int HandleImmediateReturnValue(int rv, Entry** entry,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (rv == net::ERR_IO_PENDING) {
// OnAsyncCompletion will be called later.
callback_ = callback;
@@ -102,10 +102,10 @@ class AppCacheDiskCache::ActiveCall {
}
Entry** entry_;
- net::CompletionCallback* callback_;
+ net::OldCompletionCallback* callback_;
AppCacheDiskCache* owner_;
disk_cache::Entry* entry_ptr_;
- net::CompletionCallbackImpl<ActiveCall> async_completion_;
+ net::OldCompletionCallbackImpl<ActiveCall> async_completion_;
};
AppCacheDiskCache::AppCacheDiskCache()
@@ -124,13 +124,13 @@ AppCacheDiskCache::~AppCacheDiskCache() {
int AppCacheDiskCache::InitWithDiskBackend(
const FilePath& disk_cache_directory, int disk_cache_size, bool force,
- base::MessageLoopProxy* cache_thread, net::CompletionCallback* callback) {
+ base::MessageLoopProxy* cache_thread, net::OldCompletionCallback* callback) {
return Init(net::APP_CACHE, disk_cache_directory,
disk_cache_size, force, cache_thread, callback);
}
int AppCacheDiskCache::InitWithMemBackend(
- int mem_cache_size, net::CompletionCallback* callback) {
+ int mem_cache_size, net::OldCompletionCallback* callback) {
return Init(net::MEMORY_CACHE, FilePath(), mem_cache_size, false, NULL,
callback);
}
@@ -149,7 +149,7 @@ void AppCacheDiskCache::Disable() {
}
int AppCacheDiskCache::CreateEntry(int64 key, Entry** entry,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(entry && callback);
if (is_disabled_)
return net::ERR_ABORTED;
@@ -166,7 +166,7 @@ int AppCacheDiskCache::CreateEntry(int64 key, Entry** entry,
}
int AppCacheDiskCache::OpenEntry(int64 key, Entry** entry,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(entry && callback);
if (is_disabled_)
return net::ERR_ABORTED;
@@ -183,7 +183,7 @@ int AppCacheDiskCache::OpenEntry(int64 key, Entry** entry,
}
int AppCacheDiskCache::DoomEntry(int64 key,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback);
if (is_disabled_)
return net::ERR_ABORTED;
@@ -203,7 +203,7 @@ int AppCacheDiskCache::Init(net::CacheType cache_type,
const FilePath& cache_directory,
int cache_size, bool force,
base::MessageLoopProxy* cache_thread,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(!is_initializing() && !disk_cache_.get());
is_disabled_ = false;
create_backend_callback_ = new CreateBackendCallback(
diff --git a/webkit/appcache/appcache_disk_cache.h b/webkit/appcache/appcache_disk_cache.h
index da39098..a4aa551 100644
--- a/webkit/appcache/appcache_disk_cache.h
+++ b/webkit/appcache/appcache_disk_cache.h
@@ -27,29 +27,29 @@ class APPCACHE_EXPORT AppCacheDiskCache
int InitWithDiskBackend(const FilePath& disk_cache_directory,
int disk_cache_size, bool force,
base::MessageLoopProxy* cache_thread,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Initializes the object to use memory only storage.
// This is used for Chrome's incognito browsing.
int InitWithMemBackend(int disk_cache_size,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
void Disable();
bool is_disabled() const { return is_disabled_; }
virtual int CreateEntry(int64 key, Entry** entry,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
virtual int OpenEntry(int64 key, Entry** entry,
- net::CompletionCallback* callback);
- virtual int DoomEntry(int64 key, net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
+ virtual int DoomEntry(int64 key, net::OldCompletionCallback* callback);
private:
class EntryImpl;
class CreateBackendCallback
- : public net::CancelableCompletionCallback<AppCacheDiskCache> {
+ : public net::CancelableOldCompletionCallback<AppCacheDiskCache> {
public:
- typedef net::CancelableCompletionCallback<AppCacheDiskCache> BaseClass;
+ typedef net::CancelableOldCompletionCallback<AppCacheDiskCache> BaseClass;
CreateBackendCallback(AppCacheDiskCache* object,
void (AppCacheDiskCache::* method)(int))
: BaseClass(object, method), backend_ptr_(NULL) {}
@@ -75,12 +75,12 @@ class APPCACHE_EXPORT AppCacheDiskCache
PendingCallType call_type;
int64 key;
Entry** entry;
- net::CompletionCallback* callback;
+ net::OldCompletionCallback* callback;
PendingCall()
: call_type(CREATE), key(0), entry(NULL), callback(NULL) {}
PendingCall(PendingCallType call_type, int64 key,
- Entry** entry, net::CompletionCallback* callback)
+ Entry** entry, net::OldCompletionCallback* callback)
: call_type(call_type), key(key), entry(entry), callback(callback) {}
};
typedef std::vector<PendingCall> PendingCalls;
@@ -94,13 +94,13 @@ class APPCACHE_EXPORT AppCacheDiskCache
disk_cache::Backend* disk_cache() { return disk_cache_.get(); }
int Init(net::CacheType cache_type, const FilePath& directory,
int cache_size, bool force, base::MessageLoopProxy* cache_thread,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
void OnCreateBackendComplete(int rv);
void AddActiveCall(ActiveCall* call) { active_calls_.insert(call); }
void RemoveActiveCall(ActiveCall* call) { active_calls_.erase(call); }
bool is_disabled_;
- net::CompletionCallback* init_callback_;
+ net::OldCompletionCallback* init_callback_;
scoped_refptr<CreateBackendCallback> create_backend_callback_;
PendingCalls pending_calls_;
ActiveCalls active_calls_;
diff --git a/webkit/appcache/appcache_quota_client.cc b/webkit/appcache/appcache_quota_client.cc
index db41d5e..94ce7fb 100644
--- a/webkit/appcache/appcache_quota_client.cc
+++ b/webkit/appcache/appcache_quota_client.cc
@@ -26,7 +26,7 @@ namespace appcache {
AppCacheQuotaClient::AppCacheQuotaClient(AppCacheService* service)
: ALLOW_THIS_IN_INITIALIZER_LIST(service_delete_callback_(
- new net::CancelableCompletionCallback<AppCacheQuotaClient>(
+ new net::CancelableOldCompletionCallback<AppCacheQuotaClient>(
this, &AppCacheQuotaClient::DidDeleteAppCachesForOrigin))),
service_(service), appcache_is_ready_(false),
quota_manager_is_destroyed_(false) {
diff --git a/webkit/appcache/appcache_quota_client.h b/webkit/appcache/appcache_quota_client.h
index 7618f9b..5f0387c 100644
--- a/webkit/appcache/appcache_quota_client.h
+++ b/webkit/appcache/appcache_quota_client.h
@@ -97,7 +97,7 @@ class AppCacheQuotaClient : public quota::QuotaClient {
// And once it's ready, we can only handle one delete request at a time,
// so we queue up additional requests while one is in already in progress.
scoped_ptr<DeletionCallback> current_delete_request_callback_;
- scoped_refptr<net::CancelableCompletionCallback<AppCacheQuotaClient> >
+ scoped_refptr<net::CancelableOldCompletionCallback<AppCacheQuotaClient> >
service_delete_callback_;
AppCacheService* service_;
diff --git a/webkit/appcache/appcache_response.cc b/webkit/appcache/appcache_response.cc
index 5917fef..3845ce3 100644
--- a/webkit/appcache/appcache_response.cc
+++ b/webkit/appcache/appcache_response.cc
@@ -77,7 +77,7 @@ AppCacheResponseIO::AppCacheResponseIO(
entry_(NULL), buffer_len_(0), user_callback_(NULL),
ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
ALLOW_THIS_IN_INITIALIZER_LIST(raw_callback_(
- new net::CancelableCompletionCallback<AppCacheResponseIO>(
+ new net::CancelableOldCompletionCallback<AppCacheResponseIO>(
this, &AppCacheResponseIO::OnRawIOComplete))) {
}
@@ -87,18 +87,18 @@ AppCacheResponseIO::~AppCacheResponseIO() {
entry_->Close();
}
-void AppCacheResponseIO::ScheduleIOCompletionCallback(int result) {
+void AppCacheResponseIO::ScheduleIOOldCompletionCallback(int result) {
MessageLoop::current()->PostTask(FROM_HERE,
method_factory_.NewRunnableMethod(
&AppCacheResponseIO::OnIOComplete, result));
}
-void AppCacheResponseIO::InvokeUserCompletionCallback(int result) {
+void AppCacheResponseIO::InvokeUserOldCompletionCallback(int result) {
// Clear the user callback and buffers prior to invoking the callback
// so the caller can schedule additional operations in the callback.
buffer_ = NULL;
info_buffer_ = NULL;
- net::CompletionCallback* temp_user_callback = user_callback_;
+ net::OldCompletionCallback* temp_user_callback = user_callback_;
user_callback_ = NULL;
temp_user_callback->Run(result);
}
@@ -110,7 +110,7 @@ void AppCacheResponseIO::ReadRaw(int index, int offset,
int rv = entry_->Read(index, offset, buf, buf_len, raw_callback_);
if (rv != net::ERR_IO_PENDING) {
raw_callback_->Release();
- ScheduleIOCompletionCallback(rv);
+ ScheduleIOOldCompletionCallback(rv);
}
}
@@ -121,7 +121,7 @@ void AppCacheResponseIO::WriteRaw(int index, int offset,
int rv = entry_->Write(index, offset, buf, buf_len, raw_callback_);
if (rv != net::ERR_IO_PENDING) {
raw_callback_->Release();
- ScheduleIOCompletionCallback(rv);
+ ScheduleIOOldCompletionCallback(rv);
}
}
@@ -147,7 +147,7 @@ AppCacheResponseReader::~AppCacheResponseReader() {
}
void AppCacheResponseReader::ReadInfo(HttpResponseInfoIOBuffer* info_buf,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback && !IsReadPending());
DCHECK(info_buf && !info_buf->http_info.get());
DCHECK(!buffer_.get() && !info_buffer_.get());
@@ -159,13 +159,13 @@ void AppCacheResponseReader::ReadInfo(HttpResponseInfoIOBuffer* info_buf,
void AppCacheResponseReader::ContinueReadInfo() {
if (!entry_) {
- ScheduleIOCompletionCallback(net::ERR_CACHE_MISS);
+ ScheduleIOOldCompletionCallback(net::ERR_CACHE_MISS);
return;
}
int size = entry_->GetSize(kResponseInfoIndex);
if (size <= 0) {
- ScheduleIOCompletionCallback(net::ERR_CACHE_MISS);
+ ScheduleIOOldCompletionCallback(net::ERR_CACHE_MISS);
return;
}
@@ -174,7 +174,7 @@ void AppCacheResponseReader::ContinueReadInfo() {
}
void AppCacheResponseReader::ReadData(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback && !IsReadPending());
DCHECK(buf && (buf_len >= 0));
DCHECK(!buffer_.get() && !info_buffer_.get());
@@ -187,7 +187,7 @@ void AppCacheResponseReader::ReadData(net::IOBuffer* buf, int buf_len,
void AppCacheResponseReader::ContinueReadData() {
if (!entry_) {
- ScheduleIOCompletionCallback(net::ERR_CACHE_MISS);
+ ScheduleIOOldCompletionCallback(net::ERR_CACHE_MISS);
return;
}
@@ -215,7 +215,7 @@ void AppCacheResponseReader::OnIOComplete(int result) {
bool response_truncated = false;
if (!info->InitFromPickle(pickle, &response_truncated) ||
!info->headers) {
- InvokeUserCompletionCallback(net::ERR_FAILED);
+ InvokeUserOldCompletionCallback(net::ERR_FAILED);
return;
}
DCHECK(!response_truncated);
@@ -229,7 +229,7 @@ void AppCacheResponseReader::OnIOComplete(int result) {
read_position_ += result;
}
}
- InvokeUserCompletionCallback(result);
+ InvokeUserOldCompletionCallback(result);
}
void AppCacheResponseReader::OpenEntryIfNeededAndContinue() {
@@ -281,7 +281,7 @@ AppCacheResponseWriter::~AppCacheResponseWriter() {
}
void AppCacheResponseWriter::WriteInfo(HttpResponseInfoIOBuffer* info_buf,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback && !IsWritePending());
DCHECK(info_buf && info_buf->http_info.get());
DCHECK(!buffer_.get() && !info_buffer_.get());
@@ -294,7 +294,7 @@ void AppCacheResponseWriter::WriteInfo(HttpResponseInfoIOBuffer* info_buf,
void AppCacheResponseWriter::ContinueWriteInfo() {
if (!entry_) {
- ScheduleIOCompletionCallback(net::ERR_FAILED);
+ ScheduleIOOldCompletionCallback(net::ERR_FAILED);
return;
}
@@ -308,7 +308,7 @@ void AppCacheResponseWriter::ContinueWriteInfo() {
}
void AppCacheResponseWriter::WriteData(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(callback && !IsWritePending());
DCHECK(buf && (buf_len >= 0));
DCHECK(!buffer_.get() && !info_buffer_.get());
@@ -321,7 +321,7 @@ void AppCacheResponseWriter::WriteData(net::IOBuffer* buf, int buf_len,
void AppCacheResponseWriter::ContinueWriteData() {
if (!entry_) {
- ScheduleIOCompletionCallback(net::ERR_FAILED);
+ ScheduleIOOldCompletionCallback(net::ERR_FAILED);
return;
}
WriteRaw(kResponseContentIndex, write_position_, buffer_, write_amount_);
@@ -335,7 +335,7 @@ void AppCacheResponseWriter::OnIOComplete(int result) {
else
info_size_ = result;
}
- InvokeUserCompletionCallback(result);
+ InvokeUserOldCompletionCallback(result);
}
void AppCacheResponseWriter::CreateEntryIfNeededAndContinue() {
diff --git a/webkit/appcache/appcache_response.h b/webkit/appcache/appcache_response.h
index a31bb9c..ca24c37 100644
--- a/webkit/appcache/appcache_response.h
+++ b/webkit/appcache/appcache_response.h
@@ -73,9 +73,9 @@ class APPCACHE_EXPORT AppCacheDiskCacheInterface {
class Entry {
public:
virtual int Read(int index, int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback) = 0;
+ net::OldCompletionCallback* completion_callback) = 0;
virtual int Write(int index, int64 offset, net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* completion_callback) = 0;
+ net::OldCompletionCallback* completion_callback) = 0;
virtual int64 GetSize(int index) = 0;
virtual void Close() = 0;
protected:
@@ -83,10 +83,10 @@ class APPCACHE_EXPORT AppCacheDiskCacheInterface {
};
virtual int CreateEntry(int64 key, Entry** entry,
- net::CompletionCallback* callback) = 0;
+ net::OldCompletionCallback* callback) = 0;
virtual int OpenEntry(int64 key, Entry** entry,
- net::CompletionCallback* callback) = 0;
- virtual int DoomEntry(int64 key, net::CompletionCallback* callback) = 0;
+ net::OldCompletionCallback* callback) = 0;
+ virtual int DoomEntry(int64 key, net::OldCompletionCallback* callback) = 0;
protected:
friend class base::RefCounted<AppCacheDiskCacheInterface>;
@@ -103,9 +103,9 @@ class APPCACHE_EXPORT AppCacheResponseIO {
friend class ScopedRunnableMethodFactory<AppCacheResponseIO>;
template <class T>
- class EntryCallback : public net::CancelableCompletionCallback<T> {
+ class EntryCallback : public net::CancelableOldCompletionCallback<T> {
public:
- typedef net::CancelableCompletionCallback<T> BaseClass;
+ typedef net::CancelableOldCompletionCallback<T> BaseClass;
EntryCallback(T* object, void (T::* method)(int))
: BaseClass(object, method), entry_ptr_(NULL) {}
@@ -123,8 +123,8 @@ class APPCACHE_EXPORT AppCacheResponseIO {
virtual void OnIOComplete(int result) = 0;
bool IsIOPending() { return user_callback_ ? true : false; }
- void ScheduleIOCompletionCallback(int result);
- void InvokeUserCompletionCallback(int result);
+ void ScheduleIOOldCompletionCallback(int result);
+ void InvokeUserOldCompletionCallback(int result);
void ReadRaw(int index, int offset, net::IOBuffer* buf, int buf_len);
void WriteRaw(int index, int offset, net::IOBuffer* buf, int buf_len);
@@ -134,13 +134,13 @@ class APPCACHE_EXPORT AppCacheResponseIO {
scoped_refptr<HttpResponseInfoIOBuffer> info_buffer_;
scoped_refptr<net::IOBuffer> buffer_;
int buffer_len_;
- net::CompletionCallback* user_callback_;
+ net::OldCompletionCallback* user_callback_;
ScopedRunnableMethodFactory<AppCacheResponseIO> method_factory_;
private:
void OnRawIOComplete(int result);
- scoped_refptr<net::CancelableCompletionCallback<AppCacheResponseIO> >
+ scoped_refptr<net::CancelableOldCompletionCallback<AppCacheResponseIO> >
raw_callback_;
};
@@ -163,7 +163,7 @@ class APPCACHE_EXPORT AppCacheResponseReader : public AppCacheResponseIO {
// Should only be called where there is no Read operation in progress.
// (virtual for testing)
virtual void ReadInfo(HttpResponseInfoIOBuffer* info_buf,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Reads data from storage. Always returns the result of the read
// asynchronously through the 'callback'. Returns the number of bytes read
@@ -174,7 +174,7 @@ class APPCACHE_EXPORT AppCacheResponseReader : public AppCacheResponseIO {
// Should only be called where there is no Read operation in progress.
// (virtual for testing)
virtual void ReadData(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Returns true if there is a read operation, for data or info, pending.
bool IsReadPending() { return IsIOPending(); }
@@ -220,7 +220,7 @@ class APPCACHE_EXPORT AppCacheResponseWriter : public AppCacheResponseIO {
// required parameter. The contents of 'info_buf' are not modified.
// Should only be called where there is no Write operation in progress.
void WriteInfo(HttpResponseInfoIOBuffer* info_buf,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Writes data to storage. Always returns the result of the write
// asynchronously through the 'callback'. Returns the number of bytes written
@@ -231,7 +231,7 @@ class APPCACHE_EXPORT AppCacheResponseWriter : public AppCacheResponseIO {
// The contents of 'buf' are not modified.
// Should only be called where there is no Write operation in progress.
void WriteData(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Returns true if there is a write pending.
bool IsWritePending() { return IsIOPending(); }
diff --git a/webkit/appcache/appcache_response_unittest.cc b/webkit/appcache/appcache_response_unittest.cc
index 8c181d6..2a36b5e 100644
--- a/webkit/appcache/appcache_response_unittest.cc
+++ b/webkit/appcache/appcache_response_unittest.cc
@@ -662,8 +662,8 @@ class AppCacheResponseTest : public testing::Test {
scoped_refptr<HttpResponseInfoIOBuffer> read_info_buffer_;
scoped_refptr<IOBuffer> read_buffer_;
int expected_read_result_;
- net::CompletionCallbackImpl<AppCacheResponseTest> read_callback_;
- net::CompletionCallbackImpl<AppCacheResponseTest> read_info_callback_;
+ net::OldCompletionCallbackImpl<AppCacheResponseTest> read_callback_;
+ net::OldCompletionCallbackImpl<AppCacheResponseTest> read_info_callback_;
bool should_delete_reader_in_completion_callback_;
int reader_deletion_count_down_;
bool read_callback_was_called_;
@@ -673,8 +673,8 @@ class AppCacheResponseTest : public testing::Test {
scoped_refptr<HttpResponseInfoIOBuffer> write_info_buffer_;
scoped_refptr<IOBuffer> write_buffer_;
int expected_write_result_;
- net::CompletionCallbackImpl<AppCacheResponseTest> write_callback_;
- net::CompletionCallbackImpl<AppCacheResponseTest> write_info_callback_;
+ net::OldCompletionCallbackImpl<AppCacheResponseTest> write_callback_;
+ net::OldCompletionCallbackImpl<AppCacheResponseTest> write_info_callback_;
bool should_delete_writer_in_completion_callback_;
int writer_deletion_count_down_;
bool write_callback_was_called_;
diff --git a/webkit/appcache/appcache_service.cc b/webkit/appcache/appcache_service.cc
index b05ff01..a16a9dc 100644
--- a/webkit/appcache/appcache_service.cc
+++ b/webkit/appcache/appcache_service.cc
@@ -31,7 +31,7 @@ class AppCacheService::AsyncHelper
: public AppCacheStorage::Delegate {
public:
AsyncHelper(
- AppCacheService* service, net::CompletionCallback* callback)
+ AppCacheService* service, net::OldCompletionCallback* callback)
: service_(service), callback_(callback) {
service_->pending_helpers_.insert(this);
}
@@ -55,12 +55,12 @@ class AppCacheService::AsyncHelper
callback_ = NULL;
}
- static void DeferredCallCallback(net::CompletionCallback* callback, int rv) {
+ static void DeferredCallCallback(net::OldCompletionCallback* callback, int rv) {
callback->Run(rv);
}
AppCacheService* service_;
- net::CompletionCallback* callback_;
+ net::OldCompletionCallback* callback_;
};
void AppCacheService::AsyncHelper::Cancel() {
@@ -78,7 +78,7 @@ class AppCacheService::CanHandleOfflineHelper : AsyncHelper {
public:
CanHandleOfflineHelper(
AppCacheService* service, const GURL& url,
- const GURL& first_party, net::CompletionCallback* callback)
+ const GURL& first_party, net::OldCompletionCallback* callback)
: AsyncHelper(service, callback), url_(url), first_party_(first_party) {
}
@@ -119,7 +119,7 @@ class AppCacheService::DeleteHelper : public AsyncHelper {
public:
DeleteHelper(
AppCacheService* service, const GURL& manifest_url,
- net::CompletionCallback* callback)
+ net::OldCompletionCallback* callback)
: AsyncHelper(service, callback), manifest_url_(manifest_url) {
}
@@ -162,7 +162,7 @@ class AppCacheService::DeleteOriginHelper : public AsyncHelper {
public:
DeleteOriginHelper(
AppCacheService* service, const GURL& origin,
- net::CompletionCallback* callback)
+ net::OldCompletionCallback* callback)
: AsyncHelper(service, callback), origin_(origin),
num_caches_to_delete_(0), successes_(0), failures_(0) {
}
@@ -252,7 +252,7 @@ class AppCacheService::GetInfoHelper : AsyncHelper {
public:
GetInfoHelper(
AppCacheService* service, AppCacheInfoCollection* collection,
- net::CompletionCallback* callback)
+ net::OldCompletionCallback* callback)
: AsyncHelper(service, callback), collection_(collection) {
}
@@ -327,8 +327,8 @@ class AppCacheService::CheckResponseHelper : AsyncHelper {
int64 expected_total_size_;
int amount_headers_read_;
int amount_data_read_;
- net::CompletionCallbackImpl<CheckResponseHelper> read_info_callback_;
- net::CompletionCallbackImpl<CheckResponseHelper> read_data_callback_;
+ net::OldCompletionCallbackImpl<CheckResponseHelper> read_info_callback_;
+ net::OldCompletionCallbackImpl<CheckResponseHelper> read_data_callback_;
DISALLOW_COPY_AND_ASSIGN(CheckResponseHelper);
};
@@ -445,27 +445,27 @@ void AppCacheService::Initialize(const FilePath& cache_directory,
void AppCacheService::CanHandleMainResourceOffline(
const GURL& url,
const GURL& first_party,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
CanHandleOfflineHelper* helper =
new CanHandleOfflineHelper(this, url, first_party, callback);
helper->Start();
}
void AppCacheService::GetAllAppCacheInfo(AppCacheInfoCollection* collection,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(collection);
GetInfoHelper* helper = new GetInfoHelper(this, collection, callback);
helper->Start();
}
void AppCacheService::DeleteAppCacheGroup(const GURL& manifest_url,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DeleteHelper* helper = new DeleteHelper(this, manifest_url, callback);
helper->Start();
}
void AppCacheService::DeleteAppCachesForOrigin(
- const GURL& origin, net::CompletionCallback* callback) {
+ const GURL& origin, net::OldCompletionCallback* callback) {
DeleteOriginHelper* helper = new DeleteOriginHelper(this, origin, callback);
helper->Start();
}
diff --git a/webkit/appcache/appcache_service.h b/webkit/appcache/appcache_service.h
index f8bc5b7..3a81a07 100644
--- a/webkit/appcache/appcache_service.h
+++ b/webkit/appcache/appcache_service.h
@@ -71,14 +71,14 @@ class APPCACHE_EXPORT AppCacheService {
// This method always completes asynchronously.
void CanHandleMainResourceOffline(const GURL& url,
const GURL& first_party,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Populates 'collection' with info about all of the appcaches stored
// within the service, 'callback' is invoked upon completion. The service
// acquires a reference to the 'collection' until until completion.
// This method always completes asynchronously.
void GetAllAppCacheInfo(AppCacheInfoCollection* collection,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Deletes the group identified by 'manifest_url', 'callback' is
// invoked upon completion. Upon completion, the cache group and
@@ -86,13 +86,13 @@ class APPCACHE_EXPORT AppCacheService {
// subresource loads for pages associated with a deleted group
// will fail. This method always completes asynchronously.
void DeleteAppCacheGroup(const GURL& manifest_url,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Deletes all appcaches for the origin, 'callback' is invoked upon
// completion. This method always completes asynchronously.
// (virtual for unittesting)
virtual void DeleteAppCachesForOrigin(const GURL& origin,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Checks the integrity of 'response_id' by reading the headers and data.
// If it cannot be read, the cache group for 'manifest_url' is deleted.
diff --git a/webkit/appcache/appcache_service_unittest.cc b/webkit/appcache/appcache_service_unittest.cc
index a939248..8002177 100644
--- a/webkit/appcache/appcache_service_unittest.cc
+++ b/webkit/appcache/appcache_service_unittest.cc
@@ -38,7 +38,7 @@ class MockResponseReader : public AppCacheResponseReader {
data_(data), data_size_(data_size) {
}
virtual void ReadInfo(HttpResponseInfoIOBuffer* info_buf,
- net::CompletionCallback* callback) OVERRIDE {
+ net::OldCompletionCallback* callback) OVERRIDE {
info_buffer_ = info_buf;
user_callback_ = callback; // Cleared on completion.
@@ -48,7 +48,7 @@ class MockResponseReader : public AppCacheResponseReader {
ScheduleUserCallback(rv);
}
virtual void ReadData(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) OVERRIDE {
+ net::OldCompletionCallback* callback) OVERRIDE {
buffer_ = buf;
buffer_len_ = buf_len;
user_callback_ = callback; // Cleared on completion.
@@ -67,7 +67,7 @@ class MockResponseReader : public AppCacheResponseReader {
void ScheduleUserCallback(int result) {
MessageLoop::current()->PostTask(FROM_HERE,
method_factory_.NewRunnableMethod(
- &MockResponseReader::InvokeUserCompletionCallback, result));
+ &MockResponseReader::InvokeUserOldCompletionCallback, result));
}
scoped_ptr<net::HttpResponseInfo> info_;
@@ -170,7 +170,7 @@ class AppCacheServiceTest : public testing::Test {
scoped_ptr<AppCacheService> service_;
int delete_result_;
int delete_completion_count_;
- net::CompletionCallbackImpl<AppCacheServiceTest> deletion_callback_;
+ net::OldCompletionCallbackImpl<AppCacheServiceTest> deletion_callback_;
};
TEST_F(AppCacheServiceTest, DeleteAppCachesForOrigin) {
diff --git a/webkit/appcache/appcache_storage.h b/webkit/appcache/appcache_storage.h
index b9b3d40..7df1580 100644
--- a/webkit/appcache/appcache_storage.h
+++ b/webkit/appcache/appcache_storage.h
@@ -251,7 +251,7 @@ class APPCACHE_EXPORT AppCacheStorage {
scoped_ptr<AppCacheResponseReader> reader_;
DelegateReferenceVector delegates_;
scoped_refptr<HttpResponseInfoIOBuffer> info_buffer_;
- net::CompletionCallbackImpl<ResponseInfoLoadTask> read_callback_;
+ net::OldCompletionCallbackImpl<ResponseInfoLoadTask> read_callback_;
};
typedef std::map<int64, ResponseInfoLoadTask*> PendingResponseInfoLoads;
diff --git a/webkit/appcache/appcache_storage_impl.h b/webkit/appcache/appcache_storage_impl.h
index 3e7b0da..b8f1a91 100644
--- a/webkit/appcache/appcache_storage_impl.h
+++ b/webkit/appcache/appcache_storage_impl.h
@@ -147,8 +147,8 @@ class AppCacheStorageImpl : public AppCacheStorage {
int64 last_deletable_response_rowid_;
// AppCacheDiskCache async callbacks
- net::CompletionCallbackImpl<AppCacheStorageImpl> doom_callback_;
- net::CompletionCallbackImpl<AppCacheStorageImpl> init_callback_;
+ net::OldCompletionCallbackImpl<AppCacheStorageImpl> doom_callback_;
+ net::OldCompletionCallbackImpl<AppCacheStorageImpl> init_callback_;
// Created on the IO thread, but only used on the DB thread.
AppCacheDatabase* database_;
diff --git a/webkit/appcache/appcache_test_helper.h b/webkit/appcache/appcache_test_helper.h
index 7ca944f..70f4707 100644
--- a/webkit/appcache/appcache_test_helper.h
+++ b/webkit/appcache/appcache_test_helper.h
@@ -37,7 +37,7 @@ class AppCacheTestHelper : public appcache::AppCacheStorage::Delegate {
int group_id_;
int appcache_id_;
int response_id_;
- net::CompletionCallbackImpl<AppCacheTestHelper> appcache_got_info_callback_;
+ net::OldCompletionCallbackImpl<AppCacheTestHelper> appcache_got_info_callback_;
scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_;
std::set<GURL>* origins_; // not owned
diff --git a/webkit/appcache/appcache_update_job.h b/webkit/appcache/appcache_update_job.h
index adbf22f..6af14bd 100644
--- a/webkit/appcache/appcache_update_job.h
+++ b/webkit/appcache/appcache_update_job.h
@@ -143,7 +143,7 @@ class APPCACHE_EXPORT AppCacheUpdateJob : public AppCacheStorage::Delegate,
scoped_refptr<net::HttpResponseHeaders> existing_response_headers_;
std::string manifest_data_;
scoped_ptr<AppCacheResponseWriter> response_writer_;
- net::CompletionCallbackImpl<URLFetcher> write_callback_;
+ net::OldCompletionCallbackImpl<URLFetcher> write_callback_;
}; // class URLFetcher
AppCacheResponseWriter* CreateResponseWriter();
@@ -304,9 +304,9 @@ class APPCACHE_EXPORT AppCacheUpdateJob : public AppCacheStorage::Delegate,
// Whether we've stored the resulting group/cache yet.
StoredState stored_state_;
- net::CompletionCallbackImpl<AppCacheUpdateJob> manifest_info_write_callback_;
- net::CompletionCallbackImpl<AppCacheUpdateJob> manifest_data_write_callback_;
- net::CompletionCallbackImpl<AppCacheUpdateJob> manifest_data_read_callback_;
+ net::OldCompletionCallbackImpl<AppCacheUpdateJob> manifest_info_write_callback_;
+ net::OldCompletionCallbackImpl<AppCacheUpdateJob> manifest_data_write_callback_;
+ net::OldCompletionCallbackImpl<AppCacheUpdateJob> manifest_data_read_callback_;
FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate);
diff --git a/webkit/appcache/appcache_update_job_unittest.cc b/webkit/appcache/appcache_update_job_unittest.cc
index c8a4a71..9283e0f 100644
--- a/webkit/appcache/appcache_update_job_unittest.cc
+++ b/webkit/appcache/appcache_update_job_unittest.cc
@@ -952,7 +952,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_refptr<net::StringIOBuffer> io_buffer(
new net::StringIOBuffer(seed_data));
write_callback_.reset(
- new net::CompletionCallbackImpl<AppCacheUpdateJobTest>(this,
+ new net::OldCompletionCallbackImpl<AppCacheUpdateJobTest>(this,
&AppCacheUpdateJobTest::StartUpdateAfterSeedingStorageData));
response_writer_->WriteData(io_buffer, seed_data.length(),
write_callback_.get());
@@ -1050,7 +1050,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_refptr<net::StringIOBuffer> io_buffer(
new net::StringIOBuffer(seed_data));
write_callback_.reset(
- new net::CompletionCallbackImpl<AppCacheUpdateJobTest>(this,
+ new net::OldCompletionCallbackImpl<AppCacheUpdateJobTest>(this,
&AppCacheUpdateJobTest::StartUpdateAfterSeedingStorageData));
response_writer_->WriteData(io_buffer, seed_data.length(),
write_callback_.get());
@@ -1112,7 +1112,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_refptr<HttpResponseInfoIOBuffer> io_buffer(
new HttpResponseInfoIOBuffer(response_info)); // adds ref to info
write_callback_.reset(
- new net::CompletionCallbackImpl<AppCacheUpdateJobTest>(this,
+ new net::OldCompletionCallbackImpl<AppCacheUpdateJobTest>(this,
&AppCacheUpdateJobTest::StartUpdateAfterSeedingStorageData));
response_writer_->WriteInfo(io_buffer, write_callback_.get());
@@ -1170,7 +1170,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_refptr<HttpResponseInfoIOBuffer> io_buffer(
new HttpResponseInfoIOBuffer(response_info)); // adds ref to info
write_callback_.reset(
- new net::CompletionCallbackImpl<AppCacheUpdateJobTest>(this,
+ new net::OldCompletionCallbackImpl<AppCacheUpdateJobTest>(this,
&AppCacheUpdateJobTest::StartUpdateAfterSeedingStorageData));
response_writer_->WriteInfo(io_buffer, write_callback_.get());
@@ -1228,7 +1228,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_refptr<HttpResponseInfoIOBuffer> io_buffer(
new HttpResponseInfoIOBuffer(response_info)); // adds ref to info
write_callback_.reset(
- new net::CompletionCallbackImpl<AppCacheUpdateJobTest>(this,
+ new net::OldCompletionCallbackImpl<AppCacheUpdateJobTest>(this,
&AppCacheUpdateJobTest::StartUpdateAfterSeedingStorageData));
response_writer_->WriteInfo(io_buffer, write_callback_.get());
@@ -2608,7 +2608,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_refptr<HttpResponseInfoIOBuffer> io_buffer(
new HttpResponseInfoIOBuffer(response_info)); // adds ref to info
write_callback_.reset(
- new net::CompletionCallbackImpl<AppCacheUpdateJobTest>(this,
+ new net::OldCompletionCallbackImpl<AppCacheUpdateJobTest>(this,
&AppCacheUpdateJobTest::StartUpdateAfterSeedingStorageData));
response_writer_->WriteInfo(io_buffer, write_callback_.get());
@@ -2666,7 +2666,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_refptr<HttpResponseInfoIOBuffer> io_buffer(
new HttpResponseInfoIOBuffer(response_info)); // adds ref to info
write_callback_.reset(
- new net::CompletionCallbackImpl<AppCacheUpdateJobTest>(this,
+ new net::OldCompletionCallbackImpl<AppCacheUpdateJobTest>(this,
&AppCacheUpdateJobTest::StartUpdateAfterSeedingStorageData));
response_writer_->WriteInfo(io_buffer, write_callback_.get());
@@ -3152,7 +3152,7 @@ class AppCacheUpdateJobTest : public testing::Test,
scoped_ptr<base::WaitableEvent> event_;
scoped_ptr<AppCacheResponseWriter> response_writer_;
- scoped_ptr<net::CompletionCallbackImpl<AppCacheUpdateJobTest> >
+ scoped_ptr<net::OldCompletionCallbackImpl<AppCacheUpdateJobTest> >
write_callback_;
// Hosts used by an async test that need to live until update job finishes.
diff --git a/webkit/appcache/appcache_url_request_job.h b/webkit/appcache/appcache_url_request_job.h
index 8144ebd..fed5722 100644
--- a/webkit/appcache/appcache_url_request_job.h
+++ b/webkit/appcache/appcache_url_request_job.h
@@ -133,7 +133,7 @@ class APPCACHE_EXPORT AppCacheURLRequestJob : public net::URLRequestJob,
net::HttpByteRange range_requested_;
scoped_ptr<net::HttpResponseInfo> range_response_info_;
scoped_ptr<AppCacheResponseReader> reader_;
- net::CompletionCallbackImpl<AppCacheURLRequestJob> read_callback_;
+ net::OldCompletionCallbackImpl<AppCacheURLRequestJob> read_callback_;
ScopedRunnableMethodFactory<AppCacheURLRequestJob> method_factory_;
};
diff --git a/webkit/appcache/appcache_url_request_job_unittest.cc b/webkit/appcache/appcache_url_request_job_unittest.cc
index 455f403..9f406ca 100644
--- a/webkit/appcache/appcache_url_request_job_unittest.cc
+++ b/webkit/appcache/appcache_url_request_job_unittest.cc
@@ -751,8 +751,8 @@ class AppCacheURLRequestJobTest : public testing::Test {
scoped_refptr<HttpResponseInfoIOBuffer> read_info_buffer_;
scoped_refptr<IOBuffer> read_buffer_;
int expected_read_result_;
- net::CompletionCallbackImpl<AppCacheURLRequestJobTest> read_callback_;
- net::CompletionCallbackImpl<AppCacheURLRequestJobTest> read_info_callback_;
+ net::OldCompletionCallbackImpl<AppCacheURLRequestJobTest> read_callback_;
+ net::OldCompletionCallbackImpl<AppCacheURLRequestJobTest> read_info_callback_;
bool should_delete_reader_in_completion_callback_;
int reader_deletion_count_down_;
bool read_callback_was_called_;
@@ -762,8 +762,8 @@ class AppCacheURLRequestJobTest : public testing::Test {
scoped_refptr<HttpResponseInfoIOBuffer> write_info_buffer_;
scoped_refptr<IOBuffer> write_buffer_;
int expected_write_result_;
- net::CompletionCallbackImpl<AppCacheURLRequestJobTest> write_callback_;
- net::CompletionCallbackImpl<AppCacheURLRequestJobTest> write_info_callback_;
+ net::OldCompletionCallbackImpl<AppCacheURLRequestJobTest> write_callback_;
+ net::OldCompletionCallbackImpl<AppCacheURLRequestJobTest> write_info_callback_;
bool should_delete_writer_in_completion_callback_;
int writer_deletion_count_down_;
bool write_callback_was_called_;
diff --git a/webkit/appcache/mock_appcache_service.cc b/webkit/appcache/mock_appcache_service.cc
index d87e4f1..a78fd39 100644
--- a/webkit/appcache/mock_appcache_service.cc
+++ b/webkit/appcache/mock_appcache_service.cc
@@ -8,12 +8,12 @@
namespace appcache {
-static void DeferredCallCallback(net::CompletionCallback* callback, int rv) {
+static void DeferredCallCallback(net::OldCompletionCallback* callback, int rv) {
callback->Run(rv);
}
void MockAppCacheService::DeleteAppCachesForOrigin(
- const GURL& origin, net::CompletionCallback* callback) {
+ const GURL& origin, net::OldCompletionCallback* callback) {
++delete_called_count_;
MessageLoop::current()->PostTask(
FROM_HERE,
diff --git a/webkit/appcache/mock_appcache_service.h b/webkit/appcache/mock_appcache_service.h
index 1679d9f..e828504 100644
--- a/webkit/appcache/mock_appcache_service.h
+++ b/webkit/appcache/mock_appcache_service.h
@@ -25,7 +25,7 @@ class MockAppCacheService : public AppCacheService {
// Just returns a canned completion code without actually
// removing groups and caches in our mock storage instance.
virtual void DeleteAppCachesForOrigin(const GURL& origin,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
void set_quota_manager_proxy(quota::QuotaManagerProxy* proxy) {
quota_manager_proxy_ = proxy;
diff --git a/webkit/appcache/view_appcache_internals_job.cc b/webkit/appcache/view_appcache_internals_job.cc
index 8e5f32a..8e73052 100644
--- a/webkit/appcache/view_appcache_internals_job.cc
+++ b/webkit/appcache/view_appcache_internals_job.cc
@@ -315,7 +315,7 @@ class MainPageJob : public BaseInternalsJob {
DCHECK(request_);
info_collection_ = new AppCacheInfoCollection;
gotinfo_complete_callback_ =
- new net::CancelableCompletionCallback<MainPageJob>(
+ new net::CancelableOldCompletionCallback<MainPageJob>(
this, &MainPageJob::OnGotInfoComplete);
appcache_service_->GetAllAppCacheInfo(
info_collection_, gotinfo_complete_callback_);
@@ -365,7 +365,7 @@ class MainPageJob : public BaseInternalsJob {
StartAsync();
}
- scoped_refptr<net::CancelableCompletionCallback<MainPageJob> >
+ scoped_refptr<net::CancelableOldCompletionCallback<MainPageJob> >
gotinfo_complete_callback_;
scoped_refptr<AppCacheInfoCollection> info_collection_;
DISALLOW_COPY_AND_ASSIGN(MainPageJob);
@@ -402,7 +402,7 @@ class RemoveAppCacheJob : public RedirectToMainPageJob {
virtual void Start() {
DCHECK(request_);
delete_appcache_callback_ =
- new net::CancelableCompletionCallback<RemoveAppCacheJob>(
+ new net::CancelableOldCompletionCallback<RemoveAppCacheJob>(
this, &RemoveAppCacheJob::OnDeleteAppCacheComplete);
appcache_service_->DeleteAppCacheGroup(
manifest_url_, delete_appcache_callback_);
@@ -420,7 +420,7 @@ class RemoveAppCacheJob : public RedirectToMainPageJob {
}
GURL manifest_url_;
- scoped_refptr<net::CancelableCompletionCallback<RemoveAppCacheJob> >
+ scoped_refptr<net::CancelableOldCompletionCallback<RemoveAppCacheJob> >
delete_appcache_callback_;
};
@@ -579,7 +579,7 @@ class ViewEntryJob : public BaseInternalsJob,
scoped_refptr<net::IOBuffer> response_data_;
int amount_read_;
scoped_ptr<AppCacheResponseReader> reader_;
- net::CompletionCallbackImpl<ViewEntryJob> read_callback_;
+ net::OldCompletionCallbackImpl<ViewEntryJob> read_callback_;
};
} // namespace
diff --git a/webkit/blob/blob_url_request_job.h b/webkit/blob/blob_url_request_job.h
index 1153f13..843d9ca 100644
--- a/webkit/blob/blob_url_request_job.h
+++ b/webkit/blob/blob_url_request_job.h
@@ -72,7 +72,7 @@ class BlobURLRequestJob : public net::URLRequestJob {
base::ScopedCallbackFactory<BlobURLRequestJob> callback_factory_;
scoped_refptr<BlobData> blob_data_;
scoped_refptr<base::MessageLoopProxy> file_thread_proxy_;
- net::CompletionCallbackImpl<BlobURLRequestJob> io_callback_;
+ net::OldCompletionCallbackImpl<BlobURLRequestJob> io_callback_;
std::vector<int64> item_length_list_;
scoped_ptr<net::FileStream> stream_;
size_t item_index_;
diff --git a/webkit/database/database_quota_client.cc b/webkit/database/database_quota_client.cc
index f72910d..32482fd 100644
--- a/webkit/database/database_quota_client.cc
+++ b/webkit/database/database_quota_client.cc
@@ -143,7 +143,7 @@ class DatabaseQuotaClient::DeleteOriginTask : public HelperTask {
result_(quota::kQuotaStatusUnknown),
caller_callback_(caller_callback),
ALLOW_THIS_IN_INITIALIZER_LIST(completion_callback_(
- this, &DeleteOriginTask::OnCompletionCallback)) {
+ this, &DeleteOriginTask::OnOldCompletionCallback)) {
}
private:
@@ -159,16 +159,16 @@ class DatabaseQuotaClient::DeleteOriginTask : public HelperTask {
}
virtual bool RunOnTargetThreadAsync() OVERRIDE {
- AddRef(); // balanced in OnCompletionCallback
+ AddRef(); // balanced in OnOldCompletionCallback
string16 origin_id = DatabaseUtil::GetOriginIdentifier(origin_url_);
int rv = db_tracker_->DeleteDataForOrigin(origin_id, &completion_callback_);
if (rv == net::ERR_IO_PENDING)
return false; // we wait for the callback
- OnCompletionCallback(rv);
+ OnOldCompletionCallback(rv);
return false;
}
- void OnCompletionCallback(int rv) {
+ void OnOldCompletionCallback(int rv) {
if (rv == net::OK)
result_ = quota::kQuotaStatusOk;
original_message_loop()->PostTask(
@@ -179,7 +179,7 @@ class DatabaseQuotaClient::DeleteOriginTask : public HelperTask {
const GURL origin_url_;
quota::QuotaStatusCode result_;
scoped_ptr<DeletionCallback> caller_callback_;
- net::CompletionCallbackImpl<DeleteOriginTask> completion_callback_;
+ net::OldCompletionCallbackImpl<DeleteOriginTask> completion_callback_;
};
// DatabaseQuotaClient --------------------------------------------------------
diff --git a/webkit/database/database_quota_client_unittest.cc b/webkit/database/database_quota_client_unittest.cc
index 2f29f60..ba91206 100644
--- a/webkit/database/database_quota_client_unittest.cc
+++ b/webkit/database/database_quota_client_unittest.cc
@@ -68,7 +68,7 @@ class MockDatabaseTracker : public DatabaseTracker {
virtual int DeleteDataForOrigin(
const string16& origin_id,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
++delete_called_count_;
if (async_delete()) {
base::MessageLoopProxy::current()->PostTask(FROM_HERE,
@@ -79,7 +79,7 @@ class MockDatabaseTracker : public DatabaseTracker {
return net::OK;
}
- void AsyncDeleteDataForOrigin(net::CompletionCallback* callback) {
+ void AsyncDeleteDataForOrigin(net::OldCompletionCallback* callback) {
callback->Run(net::OK);
}
diff --git a/webkit/database/database_tracker.cc b/webkit/database/database_tracker.cc
index 12c6f5c..1bd532c 100644
--- a/webkit/database/database_tracker.cc
+++ b/webkit/database/database_tracker.cc
@@ -214,7 +214,7 @@ void DatabaseTracker::DeleteDatabaseIfNeeded(const string16& origin_identifier,
if (dbs_to_be_deleted_[origin_identifier].empty())
dbs_to_be_deleted_.erase(origin_identifier);
- std::vector<net::CompletionCallback*> to_be_deleted;
+ std::vector<net::OldCompletionCallback*> to_be_deleted;
for (PendingCompletionMap::iterator callback = deletion_callbacks_.begin();
callback != deletion_callbacks_.end(); ++callback) {
DatabaseSet::iterator found_origin =
@@ -225,14 +225,14 @@ void DatabaseTracker::DeleteDatabaseIfNeeded(const string16& origin_identifier,
if (databases.empty()) {
callback->second.erase(found_origin);
if (callback->second.empty()) {
- net::CompletionCallback* cb = callback->first;
+ net::OldCompletionCallback* cb = callback->first;
cb->Run(net::OK);
to_be_deleted.push_back(cb);
}
}
}
}
- for (std::vector<net::CompletionCallback*>::iterator cb =
+ for (std::vector<net::OldCompletionCallback*>::iterator cb =
to_be_deleted.begin(); cb != to_be_deleted.end(); ++cb)
deletion_callbacks_.erase(*cb);
}
@@ -629,7 +629,7 @@ void DatabaseTracker::ScheduleDatabaseForDeletion(
void DatabaseTracker::ScheduleDatabasesForDeletion(
const DatabaseSet& databases,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
DCHECK(!callback ||
deletion_callbacks_.find(callback) == deletion_callbacks_.end());
DCHECK(!databases.empty());
@@ -645,7 +645,7 @@ void DatabaseTracker::ScheduleDatabasesForDeletion(
int DatabaseTracker::DeleteDatabase(const string16& origin_identifier,
const string16& database_name,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (!LazyInit())
return net::ERR_FAILED;
@@ -665,7 +665,7 @@ int DatabaseTracker::DeleteDatabase(const string16& origin_identifier,
int DatabaseTracker::DeleteDataModifiedSince(
const base::Time& cutoff,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (!LazyInit())
return net::ERR_FAILED;
@@ -715,7 +715,7 @@ int DatabaseTracker::DeleteDataModifiedSince(
}
int DatabaseTracker::DeleteDataForOrigin(const string16& origin,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (!LazyInit())
return net::ERR_FAILED;
diff --git a/webkit/database/database_tracker.h b/webkit/database/database_tracker.h
index 1acfc92..c2432f5 100644
--- a/webkit/database/database_tracker.h
+++ b/webkit/database/database_tracker.h
@@ -133,7 +133,7 @@ class DatabaseTracker
// if non-NULL.
int DeleteDatabase(const string16& origin_identifier,
const string16& database_name,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Delete any databases that have been touched since the cutoff date that's
// supplied, omitting any that match IDs within |protected_origins|.
@@ -142,14 +142,14 @@ class DatabaseTracker
// if non-NULL. Protected origins, according the the SpecialStoragePolicy,
// are not deleted by this method.
int DeleteDataModifiedSince(const base::Time& cutoff,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Delete all databases that belong to the given origin. Returns net::OK on
// success, net::FAILED if not all databases could be deleted, and
// net::ERR_IO_PENDING and |callback| is invoked upon completion, if non-NULL.
// virtual for unit testing only
virtual int DeleteDataForOrigin(const string16& origin_identifier,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
bool IsIncognitoProfile() const { return is_incognito_; }
@@ -170,7 +170,7 @@ class DatabaseTracker
friend class MockDatabaseTracker; // for testing
typedef std::map<string16, std::set<string16> > DatabaseSet;
- typedef std::map<net::CompletionCallback*, DatabaseSet> PendingCompletionMap;
+ typedef std::map<net::OldCompletionCallback*, DatabaseSet> PendingCompletionMap;
typedef std::map<string16, base::PlatformFile> FileHandlesMap;
typedef std::map<string16, string16> OriginDirectoriesMap;
@@ -247,7 +247,7 @@ class DatabaseTracker
// Schedule a set of open databases for deletion. If non-null, callback is
// invoked upon completion.
void ScheduleDatabasesForDeletion(const DatabaseSet& databases,
- net::CompletionCallback* callback);
+ net::OldCompletionCallback* callback);
// Returns the directory where all DB files for the given origin are stored.
string16 GetOriginDirectory(const string16& origin_identifier);
diff --git a/webkit/database/database_tracker_unittest.cc b/webkit/database/database_tracker_unittest.cc
index 6fa492c..e46e16b 100644
--- a/webkit/database/database_tracker_unittest.cc
+++ b/webkit/database/database_tracker_unittest.cc
@@ -214,7 +214,7 @@ class DatabaseTracker_TestHelper_Test {
// Delete db1. Should also delete origin1.
TestObserver observer;
tracker->AddObserver(&observer);
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
int result = tracker->DeleteDatabase(kOrigin1, kDB1, &callback);
EXPECT_EQ(net::ERR_IO_PENDING, result);
ASSERT_FALSE(callback.have_result());
diff --git a/webkit/fileapi/file_system_url_request_job.h b/webkit/fileapi/file_system_url_request_job.h
index cedabcd..1caa988 100644
--- a/webkit/fileapi/file_system_url_request_job.h
+++ b/webkit/fileapi/file_system_url_request_job.h
@@ -64,7 +64,7 @@ class FileSystemURLRequestJob : public net::URLRequestJob {
scoped_refptr<base::MessageLoopProxy> file_thread_proxy_;
ScopedRunnableMethodFactory<FileSystemURLRequestJob> method_factory_;
base::ScopedCallbackFactory<FileSystemURLRequestJob> callback_factory_;
- net::CompletionCallbackImpl<FileSystemURLRequestJob> io_callback_;
+ net::OldCompletionCallbackImpl<FileSystemURLRequestJob> io_callback_;
scoped_ptr<net::FileStream> stream_;
bool is_directory_;
scoped_ptr<net::HttpResponseInfo> response_info_;
diff --git a/webkit/fileapi/file_writer_delegate.h b/webkit/fileapi/file_writer_delegate.h
index 7f25212..18677fb 100644
--- a/webkit/fileapi/file_writer_delegate.h
+++ b/webkit/fileapi/file_writer_delegate.h
@@ -81,7 +81,7 @@ class FileWriterDelegate : public net::URLRequest::Delegate {
scoped_refptr<net::IOBufferWithSize> io_buffer_;
scoped_ptr<net::FileStream> file_stream_;
net::URLRequest* request_;
- net::CompletionCallbackImpl<FileWriterDelegate> io_callback_;
+ net::OldCompletionCallbackImpl<FileWriterDelegate> io_callback_;
ScopedRunnableMethodFactory<FileWriterDelegate> method_factory_;
base::ScopedCallbackFactory<FileWriterDelegate> callback_factory_;
};
diff --git a/webkit/fileapi/webfilewriter_base_unittest.cc b/webkit/fileapi/webfilewriter_base_unittest.cc
index 43164e7..69ef033 100644
--- a/webkit/fileapi/webfilewriter_base_unittest.cc
+++ b/webkit/fileapi/webfilewriter_base_unittest.cc
@@ -385,7 +385,7 @@ TEST_F(FileWriterTest, CancelFailedTruncate) {
EXPECT_EQ(0, received_did_write_count_);
}
-TEST_F(FileWriterTest, DeleteInCompletionCallbacks) {
+TEST_F(FileWriterTest, DeleteInOldCompletionCallbacks) {
delete_in_client_callback_ = true;
writer()->write(kBasicFileWrite_Offset, GURL("blob://bloburl/"));
EXPECT_FALSE(testable_writer_.get());
diff --git a/webkit/glue/media/buffered_data_source_unittest.cc b/webkit/glue/media/buffered_data_source_unittest.cc
index 4b10e79..1a7c28c 100644
--- a/webkit/glue/media/buffered_data_source_unittest.cc
+++ b/webkit/glue/media/buffered_data_source_unittest.cc
@@ -74,12 +74,12 @@ class MockBufferedResourceLoader : public BufferedResourceLoader {
: BufferedResourceLoader(GURL(), 0, 0, new media::MediaLog()) {
}
- MOCK_METHOD3(Start, void(net::CompletionCallback* read_callback,
+ MOCK_METHOD3(Start, void(net::OldCompletionCallback* read_callback,
const base::Closure& network_callback,
WebFrame* frame));
MOCK_METHOD0(Stop, void());
MOCK_METHOD4(Read, void(int64 position, int read_size, uint8* buffer,
- net::CompletionCallback* callback));
+ net::OldCompletionCallback* callback));
MOCK_METHOD0(content_length, int64());
MOCK_METHOD0(instance_size, int64());
MOCK_METHOD0(range_supported, bool());
@@ -225,7 +225,7 @@ class BufferedDataSourceTest : public testing::Test {
}
void InvokeStartCallback(
- net::CompletionCallback* callback,
+ net::OldCompletionCallback* callback,
const base::Closure& network_callback,
WebFrame* frame) {
callback->RunWithParams(Tuple1<int>(error_));
@@ -234,7 +234,7 @@ class BufferedDataSourceTest : public testing::Test {
}
void InvokeReadCallback(int64 position, int size, uint8* buffer,
- net::CompletionCallback* callback) {
+ net::OldCompletionCallback* callback) {
if (error_ > 0)
memcpy(buffer, data_ + static_cast<int>(position), error_);
callback->RunWithParams(Tuple1<int>(error_));
diff --git a/webkit/glue/media/buffered_resource_loader.cc b/webkit/glue/media/buffered_resource_loader.cc
index 44ebc75..07f5729 100644
--- a/webkit/glue/media/buffered_resource_loader.cc
+++ b/webkit/glue/media/buffered_resource_loader.cc
@@ -89,7 +89,7 @@ BufferedResourceLoader::~BufferedResourceLoader() {
url_loader_->cancel();
}
-void BufferedResourceLoader::Start(net::CompletionCallback* start_callback,
+void BufferedResourceLoader::Start(net::OldCompletionCallback* start_callback,
const base::Closure& event_callback,
WebFrame* frame) {
// Make sure we have not started.
@@ -172,7 +172,7 @@ void BufferedResourceLoader::Stop() {
void BufferedResourceLoader::Read(int64 position,
int read_size,
uint8* buffer,
- net::CompletionCallback* read_callback) {
+ net::OldCompletionCallback* read_callback) {
DCHECK(!read_callback_.get());
DCHECK(buffer_.get());
DCHECK(read_callback);
diff --git a/webkit/glue/media/buffered_resource_loader.h b/webkit/glue/media/buffered_resource_loader.h
index 0d1a4dd..a9a1520 100644
--- a/webkit/glue/media/buffered_resource_loader.h
+++ b/webkit/glue/media/buffered_resource_loader.h
@@ -73,7 +73,7 @@ class BufferedResourceLoader
// An error code that indicates the request has failed.
// |event_callback| is called when the response is completed, data is
// received, the request is suspended or resumed.
- virtual void Start(net::CompletionCallback* callback,
+ virtual void Start(net::OldCompletionCallback* callback,
const base::Closure& event_callback,
WebKit::WebFrame* frame);
@@ -92,7 +92,7 @@ class BufferedResourceLoader
// - net::ERR_CACHE_MISS
// The read was made too far away from the current buffered position.
virtual void Read(int64 position, int read_size,
- uint8* buffer, net::CompletionCallback* callback);
+ uint8* buffer, net::OldCompletionCallback* callback);
// Returns the position of the last byte buffered. Returns
// |kPositionNotSpecified| if such value is not available.
@@ -261,14 +261,14 @@ class BufferedResourceLoader
base::Closure event_callback_;
// Members used during request start.
- scoped_ptr<net::CompletionCallback> start_callback_;
+ scoped_ptr<net::OldCompletionCallback> start_callback_;
int64 offset_;
int64 content_length_;
int64 instance_size_;
// Members used during a read operation. They should be reset after each
// read has completed or failed.
- scoped_ptr<net::CompletionCallback> read_callback_;
+ scoped_ptr<net::OldCompletionCallback> read_callback_;
int64 read_position_;
size_t read_size_;
uint8* read_buffer_;
diff --git a/webkit/plugins/ppapi/ppb_transport_impl.h b/webkit/plugins/ppapi/ppb_transport_impl.h
index 58138ab..f768ad9 100644
--- a/webkit/plugins/ppapi/ppb_transport_impl.h
+++ b/webkit/plugins/ppapi/ppb_transport_impl.h
@@ -73,8 +73,8 @@ class PPB_Transport_Impl : public ::ppapi::Resource,
scoped_refptr<TrackedCompletionCallback> recv_callback_;
scoped_refptr<TrackedCompletionCallback> send_callback_;
- net::CompletionCallbackImpl<PPB_Transport_Impl> channel_write_callback_;
- net::CompletionCallbackImpl<PPB_Transport_Impl> channel_read_callback_;
+ net::OldCompletionCallbackImpl<PPB_Transport_Impl> channel_write_callback_;
+ net::OldCompletionCallbackImpl<PPB_Transport_Impl> channel_read_callback_;
DISALLOW_COPY_AND_ASSIGN(PPB_Transport_Impl);
};