summaryrefslogtreecommitdiffstats
path: root/net/http/http_cache.cc
diff options
context:
space:
mode:
authoradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-20 01:24:20 +0000
committeradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-20 01:24:20 +0000
commitf98ead6cf97707ff5a13896aa0206364703aa393 (patch)
tree4d5b8f580f642cbcf7a15dcd71b5c914353b321e /net/http/http_cache.cc
parentb9821b183321186dd747e45013cce14ab5b8d3bd (diff)
downloadchromium_src-f98ead6cf97707ff5a13896aa0206364703aa393.zip
chromium_src-f98ead6cf97707ff5a13896aa0206364703aa393.tar.gz
chromium_src-f98ead6cf97707ff5a13896aa0206364703aa393.tar.bz2
base::Bind conversion for net/http/...
R=willchan@chromium.org Review URL: http://codereview.chromium.org/8344066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106428 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_cache.cc')
-rw-r--r--net/http/http_cache.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 23002d8..58fa5cb 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -12,6 +12,7 @@
#include <unistd.h>
#endif
+#include "base/bind.h"
#include "base/callback.h"
#include "base/format_macros.h"
#include "base/location.h"
@@ -347,8 +348,7 @@ HttpCache::HttpCache(HostResolver* host_resolver,
http_auth_handler_factory,
network_delegate,
http_server_properties,
- net_log))),
- ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)) {
+ net_log))) {
}
@@ -361,8 +361,7 @@ HttpCache::HttpCache(HttpNetworkSession* session,
ssl_host_info_factory_(new SSLHostInfoFactoryAdaptor(
session->cert_verifier(),
ALLOW_THIS_IN_INITIALIZER_LIST(this))),
- network_layer_(new HttpNetworkLayer(session)),
- ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)) {
+ network_layer_(new HttpNetworkLayer(session)) {
}
HttpCache::HttpCache(HttpTransactionFactory* network_layer,
@@ -372,8 +371,7 @@ HttpCache::HttpCache(HttpTransactionFactory* network_layer,
backend_factory_(backend_factory),
building_backend_(false),
mode_(NORMAL),
- network_layer_(network_layer),
- ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)) {
+ network_layer_(network_layer) {
}
HttpCache::~HttpCache() {
@@ -1010,8 +1008,9 @@ void HttpCache::ProcessPendingQueue(ActiveEntry* entry) {
MessageLoop::current()->PostTask(
FROM_HERE,
- task_factory_.NewRunnableMethod(&HttpCache::OnProcessPendingQueue,
- entry));
+ base::Bind(&HttpCache::OnProcessPendingQueue,
+ AsWeakPtr(),
+ entry));
}
void HttpCache::OnProcessPendingQueue(ActiveEntry* entry) {
@@ -1156,8 +1155,8 @@ void HttpCache::OnBackendCreated(int result, PendingOp* pending_op) {
MessageLoop::current()->PostTask(
FROM_HERE,
- task_factory_.NewRunnableMethod(&HttpCache::OnBackendCreated,
- result, pending_op));
+ base::Bind(&HttpCache::OnBackendCreated, AsWeakPtr(),
+ result, pending_op));
} else {
building_backend_ = false;
DeletePendingOp(pending_op);