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

Unified Diff: webkit/appcache/appcache_url_request_job.cc

Issue 8399019: base::Bind usage (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 months 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/appcache_url_request_job.cc
===================================================================
--- webkit/appcache/appcache_url_request_job.cc (revision 107404)
+++ webkit/appcache/appcache_url_request_job.cc (working copy)
@@ -30,7 +30,7 @@
cache_entry_not_found_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(read_callback_(
this, &AppCacheURLRequestJob::OnReadComplete)),
- ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) {
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
DCHECK(storage_);
}
@@ -73,8 +73,8 @@
// callbacks happen as they would for network requests.
MessageLoop::current()->PostTask(
FROM_HERE,
- method_factory_.NewRunnableMethod(
- &AppCacheURLRequestJob::BeginDelivery));
+ base::Bind(&AppCacheURLRequestJob::BeginDelivery,
+ weak_factory_.GetWeakPtr()));
}
}
@@ -220,7 +220,7 @@
storage_ = NULL;
}
net::URLRequestJob::Kill();
- method_factory_.RevokeAll();
+ weak_factory_.InvalidateWeakPtrs();
}
}

Powered by Google App Engine
This is Rietveld 408576698