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

Unified Diff: webkit/appcache/view_appcache_internals_job.cc

Issue 8991001: base::Bind: Convert most of webkit/appcache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clang 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: webkit/appcache/view_appcache_internals_job.cc
diff --git a/webkit/appcache/view_appcache_internals_job.cc b/webkit/appcache/view_appcache_internals_job.cc
index 3d51b4c0bbec9451b2d193a3f3c0f01c366833ff..2d0d27c6aeae93ec10dc6897f6e38140abe74436 100644
--- a/webkit/appcache/view_appcache_internals_job.cc
+++ b/webkit/appcache/view_appcache_internals_job.cc
@@ -505,9 +505,8 @@ class ViewEntryJob : public BaseInternalsJob,
int64 response_id, int64 group_id)
: BaseInternalsJob(request, service),
manifest_url_(manifest_url), entry_url_(entry_url),
- response_id_(response_id), group_id_(group_id), amount_read_(0),
- ALLOW_THIS_IN_INITIALIZER_LIST(read_callback_(
- this, &ViewEntryJob::OnReadComplete)) {}
+ response_id_(response_id), group_id_(group_id), amount_read_(0) {
+ }
virtual void Start() {
DCHECK(request_);
@@ -566,7 +565,8 @@ class ViewEntryJob : public BaseInternalsJob,
reader_.reset(appcache_service_->storage()->CreateResponseReader(
manifest_url_, group_id_, response_id_));
reader_->ReadData(
- response_data_, amount_to_read, &read_callback_);
+ response_data_, amount_to_read,
+ base::Bind(&ViewEntryJob::OnReadComplete, base::Unretained(this)));
}
void OnReadComplete(int result) {
@@ -585,7 +585,6 @@ class ViewEntryJob : public BaseInternalsJob,
scoped_refptr<net::IOBuffer> response_data_;
int amount_read_;
scoped_ptr<AppCacheResponseReader> reader_;
- net::OldCompletionCallbackImpl<ViewEntryJob> read_callback_;
};
} // namespace

Powered by Google App Engine
This is Rietveld 408576698