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

Unified Diff: content/browser/resolve_proxy_msg_helper.cc

Issue 8985012: base::Bind: Convert net/proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more include. 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 | « content/browser/resolve_proxy_msg_helper.h ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/resolve_proxy_msg_helper.cc
diff --git a/content/browser/resolve_proxy_msg_helper.cc b/content/browser/resolve_proxy_msg_helper.cc
index 9d984d7ba5d0913ca375c834bd51c6b4d9874a40..65a12a0a446a9149dbb815fbacaa9950bef6e777 100644
--- a/content/browser/resolve_proxy_msg_helper.cc
+++ b/content/browser/resolve_proxy_msg_helper.cc
@@ -4,6 +4,8 @@
#include "content/browser/resolve_proxy_msg_helper.h"
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
#include "content/common/view_messages.h"
#include "net/base/net_errors.h"
@@ -12,16 +14,12 @@
ResolveProxyMsgHelper::ResolveProxyMsgHelper(
net::URLRequestContextGetter* getter)
- : ALLOW_THIS_IN_INITIALIZER_LIST(callback_(
- this, &ResolveProxyMsgHelper::OnResolveProxyCompleted)),
- context_getter_(getter),
+ : context_getter_(getter),
proxy_service_(NULL) {
}
ResolveProxyMsgHelper::ResolveProxyMsgHelper(net::ProxyService* proxy_service)
- : ALLOW_THIS_IN_INITIALIZER_LIST(callback_(
- this, &ResolveProxyMsgHelper::OnResolveProxyCompleted)),
- proxy_service_(proxy_service) {
+ : proxy_service_(proxy_service) {
}
bool ResolveProxyMsgHelper::OnMessageReceived(const IPC::Message& message,
@@ -73,7 +71,10 @@ void ResolveProxyMsgHelper::StartPendingRequest() {
// Start the request.
int result = proxy_service_->ResolveProxy(
- req.url, &proxy_info_, &callback_, &req.pac_req, net::BoundNetLog());
+ req.url, &proxy_info_,
+ base::Bind(&ResolveProxyMsgHelper::OnResolveProxyCompleted,
+ base::Unretained(this)),
+ &req.pac_req, net::BoundNetLog());
// Completed synchronously.
if (result != net::ERR_IO_PENDING)
« no previous file with comments | « content/browser/resolve_proxy_msg_helper.h ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698