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

Unified Diff: net/socket/socks_client_socket.cc

Issue 848006: Generalize the net module's LoadLog facility from a passive container, to an event stream (NetLog). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Split up RequestTracker into ConnectJobTracker+RequestTracker+RequestTrackerBase, address comments Created 10 years, 9 months 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 | « net/socket/socks_client_socket.h ('k') | net/socket/socks_client_socket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socks_client_socket.cc
===================================================================
--- net/socket/socks_client_socket.cc (revision 41560)
+++ net/socket/socks_client_socket.cc (working copy)
@@ -8,7 +8,7 @@
#include "base/compiler_specific.h"
#include "base/trace_event.h"
#include "net/base/io_buffer.h"
-#include "net/base/load_log.h"
+#include "net/base/net_log.h"
#include "net/base/net_util.h"
#include "net/base/sys_addrinfo.h"
@@ -80,7 +80,7 @@
}
int SOCKSClientSocket::Connect(CompletionCallback* callback,
- LoadLog* load_log) {
+ const BoundNetLog& net_log) {
DCHECK(transport_.get());
DCHECK(transport_->IsConnected());
DCHECK_EQ(STATE_NONE, next_state_);
@@ -91,16 +91,16 @@
return OK;
next_state_ = STATE_RESOLVE_HOST;
- load_log_ = load_log;
+ net_log_ = net_log;
- LoadLog::BeginEvent(load_log, LoadLog::TYPE_SOCKS_CONNECT);
+ net_log.BeginEvent(NetLog::TYPE_SOCKS_CONNECT);
int rv = DoLoop(OK);
if (rv == ERR_IO_PENDING) {
user_callback_ = callback;
} else {
- LoadLog::EndEvent(load_log, LoadLog::TYPE_SOCKS_CONNECT);
- load_log_ = NULL;
+ net_log.EndEvent(NetLog::TYPE_SOCKS_CONNECT);
+ net_log_ = BoundNetLog();
}
return rv;
}
@@ -114,7 +114,7 @@
// These are the states initialized by Connect().
next_state_ = STATE_NONE;
user_callback_ = NULL;
- load_log_ = NULL;
+ net_log_ = BoundNetLog();
}
bool SOCKSClientSocket::IsConnected() const {
@@ -171,8 +171,8 @@
DCHECK_NE(STATE_NONE, next_state_);
int rv = DoLoop(result);
if (rv != ERR_IO_PENDING) {
- LoadLog::EndEvent(load_log_, LoadLog::TYPE_SOCKS_CONNECT);
- load_log_ = NULL;
+ net_log_.EndEvent(NetLog::TYPE_SOCKS_CONNECT);
+ net_log_ = BoundNetLog();
DoCallback(rv);
}
}
@@ -219,7 +219,7 @@
next_state_ = STATE_RESOLVE_HOST_COMPLETE;
return host_resolver_.Resolve(
- host_request_info_, &addresses_, &io_callback_, load_log_);
+ host_request_info_, &addresses_, &io_callback_, net_log_);
}
int SOCKSClientSocket::DoResolveHostComplete(int result) {
@@ -356,7 +356,7 @@
return ERR_CONNECTION_CLOSED;
if (bytes_received_ + result > kReadHeaderSize) {
- // TODO(eroman): Describe failure in LoadLog.
+ // TODO(eroman): Describe failure in NetLog.
return ERR_SOCKS_CONNECTION_FAILED;
}
« no previous file with comments | « net/socket/socks_client_socket.h ('k') | net/socket/socks_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698