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

Unified Diff: content/browser/renderer_host/pepper_message_filter.cc

Issue 8549004: base::Bind: Convert HostResolver::Resolve. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years, 1 month 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: content/browser/renderer_host/pepper_message_filter.cc
diff --git a/content/browser/renderer_host/pepper_message_filter.cc b/content/browser/renderer_host/pepper_message_filter.cc
index de155a5532a3a2293117a43a918deb136f118407..9895dfbe2462c296c3b6b44ef08c36949ee608e8 100644
--- a/content/browser/renderer_host/pepper_message_filter.cc
+++ b/content/browser/renderer_host/pepper_message_filter.cc
@@ -181,7 +181,6 @@ class PepperMessageFilter::TCPSocket {
ConnectionState connection_state_;
bool end_of_file_reached_;
- net::OldCompletionCallbackImpl<TCPSocket> resolve_callback_;
net::OldCompletionCallbackImpl<TCPSocket> connect_callback_;
net::OldCompletionCallbackImpl<TCPSocket> ssl_handshake_callback_;
net::OldCompletionCallbackImpl<TCPSocket> read_callback_;
@@ -304,8 +303,6 @@ PepperMessageFilter::TCPSocket::TCPSocket(
connection_state_(BEFORE_CONNECT),
end_of_file_reached_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(
- resolve_callback_(this, &TCPSocket::OnResolveCompleted)),
- ALLOW_THIS_IN_INITIALIZER_LIST(
connect_callback_(this, &TCPSocket::OnConnectCompleted)),
ALLOW_THIS_IN_INITIALIZER_LIST(
ssl_handshake_callback_(this, &TCPSocket::OnSSLHandshakeCompleted)),
@@ -335,8 +332,10 @@ void PepperMessageFilter::TCPSocket::Connect(const std::string& host,
net::HostResolver::RequestInfo request_info(net::HostPortPair(host, port));
resolver_.reset(new net::SingleRequestHostResolver(
manager_->GetHostResolver()));
- int result = resolver_->Resolve(request_info, &address_list_,
- &resolve_callback_, net::BoundNetLog());
+ int result = resolver_->Resolve(
+ request_info, &address_list_,
+ base::Bind(&TCPSocket::OnResolveCompleted, base::Unretained(this)),
+ net::BoundNetLog());
if (result != net::ERR_IO_PENDING)
OnResolveCompleted(result);
}
« no previous file with comments | « content/browser/renderer_host/p2p/socket_dispatcher_host.cc ('k') | jingle/notifier/communicator/xmpp_connection_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698