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

Unified Diff: webkit/appcache/appcache_storage.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_storage.h ('k') | webkit/appcache/appcache_storage_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_storage.cc
diff --git a/webkit/appcache/appcache_storage.cc b/webkit/appcache/appcache_storage.cc
index 7247c4011d51cab53d1bcd38314e30dc08842080..8d0b08bf40186a50d02b25eaac5092426984a37b 100644
--- a/webkit/appcache/appcache_storage.cc
+++ b/webkit/appcache/appcache_storage.cc
@@ -4,6 +4,8 @@
#include "webkit/appcache/appcache_storage.h"
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/stl_util.h"
#include "webkit/appcache/appcache_response.h"
#include "webkit/appcache/appcache_service.h"
@@ -46,9 +48,7 @@ AppCacheStorage::ResponseInfoLoadTask::ResponseInfoLoadTask(
manifest_url_(manifest_url),
group_id_(group_id),
response_id_(response_id),
- info_buffer_(new HttpResponseInfoIOBuffer),
- ALLOW_THIS_IN_INITIALIZER_LIST(read_callback_(
- this, &ResponseInfoLoadTask::OnReadComplete)) {
+ info_buffer_(new HttpResponseInfoIOBuffer) {
storage_->pending_info_loads_.insert(
PendingResponseInfoLoads::value_type(response_id, this));
}
@@ -61,7 +61,9 @@ void AppCacheStorage::ResponseInfoLoadTask::StartIfNeeded() {
return;
reader_.reset(
storage_->CreateResponseReader(manifest_url_, group_id_, response_id_));
- reader_->ReadInfo(info_buffer_, &read_callback_);
+ reader_->ReadInfo(
+ info_buffer_, base::Bind(&ResponseInfoLoadTask::OnReadComplete,
+ base::Unretained(this)));
}
void AppCacheStorage::ResponseInfoLoadTask::OnReadComplete(int result) {
« no previous file with comments | « webkit/appcache/appcache_storage.h ('k') | webkit/appcache/appcache_storage_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698