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

Unified Diff: webkit/appcache/appcache_url_request_job.cc

Issue 8991001: base::Bind: Convert most of webkit/appcache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix 2. 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
« no previous file with comments | « webkit/appcache/appcache_url_request_job.h ('k') | webkit/appcache/appcache_url_request_job_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_url_request_job.cc
diff --git a/webkit/appcache/appcache_url_request_job.cc b/webkit/appcache/appcache_url_request_job.cc
index 2d9b8286dd29f0845bf1a5230547223b89ddd9ab..7d1790965d31c2f55bb02570a23ab1f9809427af 100644
--- a/webkit/appcache/appcache_url_request_job.cc
+++ b/webkit/appcache/appcache_url_request_job.cc
@@ -6,6 +6,8 @@
#include "webkit/appcache/appcache_url_request_job.h"
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "base/string_util.h"
@@ -28,8 +30,6 @@ AppCacheURLRequestJob::AppCacheURLRequestJob(
delivery_type_(AWAITING_DELIVERY_ORDERS),
group_id_(0), cache_id_(kNoCacheId), is_fallback_(false),
cache_entry_not_found_(false),
- ALLOW_THIS_IN_INITIALIZER_LIST(read_callback_(
- this, &AppCacheURLRequestJob::OnReadComplete)),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
DCHECK(storage_);
}
@@ -268,7 +268,9 @@ bool AppCacheURLRequestJob::ReadRawData(net::IOBuffer* buf, int buf_size,
DCHECK_NE(buf_size, 0);
DCHECK(bytes_read);
DCHECK(!reader_->IsReadPending());
- reader_->ReadData(buf, buf_size, &read_callback_);
+ reader_->ReadData(
+ buf, buf_size, base::Bind(&AppCacheURLRequestJob::OnReadComplete,
+ base::Unretained(this)));
SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING, 0));
return false;
}
« no previous file with comments | « webkit/appcache/appcache_url_request_job.h ('k') | webkit/appcache/appcache_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698