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

Unified Diff: net/spdy/spdy_proxy_client_socket.cc

Issue 8990001: base::Bind: Convert most of net/http. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clang. 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
Index: net/spdy/spdy_proxy_client_socket.cc
diff --git a/net/spdy/spdy_proxy_client_socket.cc b/net/spdy/spdy_proxy_client_socket.cc
index 22b63d4b86dd52e268cb3b459969cb0b60c4eef3..7267fefeaf3b322a71fa3d4aa479bec17d831c4c 100644
--- a/net/spdy/spdy_proxy_client_socket.cc
+++ b/net/spdy/spdy_proxy_client_socket.cc
@@ -6,6 +6,8 @@
#include <algorithm> // min
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/logging.h"
#include "base/string_util.h"
#include "googleurl/src/gurl.h"
@@ -29,9 +31,7 @@ SpdyProxyClientSocket::SpdyProxyClientSocket(
const HostPortPair& proxy_server,
HttpAuthCache* auth_cache,
HttpAuthHandlerFactory* auth_handler_factory)
- : ALLOW_THIS_IN_INITIALIZER_LIST(
- io_callback_(this, &SpdyProxyClientSocket::OnIOComplete)),
- next_state_(STATE_DISCONNECTED),
+ : next_state_(STATE_DISCONNECTED),
spdy_stream_(spdy_stream),
endpoint_(endpoint),
auth_(
@@ -304,7 +304,10 @@ int SpdyProxyClientSocket::DoLoop(int last_io_result) {
int SpdyProxyClientSocket::DoGenerateAuthToken() {
next_state_ = STATE_GENERATE_AUTH_TOKEN_COMPLETE;
- return auth_->MaybeGenerateAuthToken(&request_, &io_callback_, net_log_);
+ return auth_->MaybeGenerateAuthToken(
+ &request_,
+ base::Bind(&SpdyProxyClientSocket::OnIOComplete, base::Unretained(this)),
+ net_log_);
}
int SpdyProxyClientSocket::DoGenerateAuthTokenComplete(int result) {

Powered by Google App Engine
This is Rietveld 408576698