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

Unified Diff: jingle/notifier/base/proxy_resolving_client_socket.cc

Issue 8551004: base::Bind: Convert jingle/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « jingle/notifier/base/proxy_resolving_client_socket.h ('k') | jingle/notifier/base/task_pump.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/notifier/base/proxy_resolving_client_socket.cc
diff --git a/jingle/notifier/base/proxy_resolving_client_socket.cc b/jingle/notifier/base/proxy_resolving_client_socket.cc
index b4cc70c6697a7282bf2b4394c6742da7ce140f94..cc5bcbe26eeb5dd8011608235f2da11517ffcdc2 100644
--- a/jingle/notifier/base/proxy_resolving_client_socket.cc
+++ b/jingle/notifier/base/proxy_resolving_client_socket.cc
@@ -5,6 +5,7 @@
#include "jingle/notifier/base/proxy_resolving_client_socket.h"
#include "base/basictypes.h"
+#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "googleurl/src/gurl.h"
@@ -35,8 +36,7 @@ ProxyResolvingClientSocket::ProxyResolvingClientSocket(
net::BoundNetLog::Make(
request_context_getter->GetURLRequestContext()->net_log(),
net::NetLog::SOURCE_SOCKET)),
- scoped_runnable_method_factory_(
- ALLOW_THIS_IN_INITIALIZER_LIST(this)),
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
user_connect_callback_(NULL) {
DCHECK(request_context_getter);
net::URLRequestContext* request_context =
@@ -117,8 +117,8 @@ int ProxyResolvingClientSocket::Connect(net::OldCompletionCallback* callback) {
CHECK(message_loop);
message_loop->PostTask(
FROM_HERE,
- scoped_runnable_method_factory_.NewRunnableMethod(
- &ProxyResolvingClientSocket::ProcessProxyResolveDone, status));
+ base::Bind(&ProxyResolvingClientSocket::ProcessProxyResolveDone,
+ weak_factory_.GetWeakPtr(), status));
}
user_connect_callback_ = callback;
return net::ERR_IO_PENDING;
@@ -270,8 +270,8 @@ int ProxyResolvingClientSocket::ReconsiderProxyAfterError(int error) {
CHECK(message_loop);
message_loop->PostTask(
FROM_HERE,
- scoped_runnable_method_factory_.NewRunnableMethod(
- &ProxyResolvingClientSocket::ProcessProxyResolveDone, rv));
+ base::Bind(&ProxyResolvingClientSocket::ProcessProxyResolveDone,
+ weak_factory_.GetWeakPtr(), rv));
// Since we potentially have another try to go (trying the direct connect)
// set the return code code to ERR_IO_PENDING.
rv = net::ERR_IO_PENDING;
« no previous file with comments | « jingle/notifier/base/proxy_resolving_client_socket.h ('k') | jingle/notifier/base/task_pump.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698