diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-21 23:45:23 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-21 23:45:23 +0000 |
commit | 52574021ab8190a5b93bdf1344dada2b420f4b1c (patch) | |
tree | 04d5497d653d5846d71b7dbb5a81ad573e94165e /net/socket/tcp_client_socket_pool.cc | |
parent | 80c845a3a24ed6a60767480b9d7ebe676c018e78 (diff) | |
download | chromium_src-52574021ab8190a5b93bdf1344dada2b420f4b1c.zip chromium_src-52574021ab8190a5b93bdf1344dada2b420f4b1c.tar.gz chromium_src-52574021ab8190a5b93bdf1344dada2b420f4b1c.tar.bz2 |
Add some extra request information to LoadLog:
* the error code that URLRequest Start() failed with.
* which peer the TCP connection is being made to [Only in full logging mode]
(for example, when using a proxy, this may differ from the host:port of the URL).
* the type of redirect that was received, and its URL [Only in full logging mode]
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/553043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36813 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/tcp_client_socket_pool.cc')
-rw-r--r-- | net/socket/tcp_client_socket_pool.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/socket/tcp_client_socket_pool.cc b/net/socket/tcp_client_socket_pool.cc index a64c073..a4e5bec 100644 --- a/net/socket/tcp_client_socket_pool.cc +++ b/net/socket/tcp_client_socket_pool.cc @@ -7,6 +7,7 @@ #include "base/compiler_specific.h" #include "base/logging.h" #include "base/message_loop.h" +#include "base/string_util.h" #include "base/time.h" #include "net/base/load_log.h" #include "net/base/net_errors.h" @@ -189,6 +190,15 @@ int TCPClientSocketPool::RequestSocket( LoadLog* load_log) { const HostResolver::RequestInfo* casted_resolve_info = static_cast<const HostResolver::RequestInfo*>(resolve_info); + + if (LoadLog::IsUnbounded(load_log)) { + LoadLog::AddString( + load_log, + StringPrintf("Requested TCP socket to: %s [port %d]", + casted_resolve_info->hostname().c_str(), + casted_resolve_info->port())); + } + return base_.RequestSocket( group_name, *casted_resolve_info, priority, handle, callback, load_log); } |