summaryrefslogtreecommitdiffstats
path: root/net/http/http_network_layer.cc
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-03 00:49:17 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-03 00:49:17 +0000
commit06650c582f9cfcf3869c490f3dc1ca224d6c9963 (patch)
treeb6585569ec02f0bec32aa65b6e36b3cbf8a8533f /net/http/http_network_layer.cc
parentcb364d78210e5d64f3c899bbfa87dadebac7d6f7 (diff)
downloadchromium_src-06650c582f9cfcf3869c490f3dc1ca224d6c9963.zip
chromium_src-06650c582f9cfcf3869c490f3dc1ca224d6c9963.tar.gz
chromium_src-06650c582f9cfcf3869c490f3dc1ca224d6c9963.tar.bz2
Rework the logging for sockets/connectjobs.
In particular, make it work better when using backup jobs / late binding (the display was very confused before because of how these asynchronous events would nest). Also changed the paradigm for how PassiveLogCollector preserves these async associations -- this fixes how it replays the events to net-internals. (Before we would collapse the event streams into the SOURCE_URL_REQUEST which lost some hiearchy.. now I keep the separate streams). Some of the particular changes to the event streams: * ConnectJobs now create their own source stream internally. * Sockets are now bounded by +SOCKET_ALIVE / -SOCKET_ALIVE events (removed the one-off SOCKET_DONE event). * The socket log streams contains +SOCKET_IN_USE / -SOCKET_IN_USE event blocks to show which URLRequest was controlling it at various points in time (this makes it much easier to understand which read/writes belonged to a particular network transaction when a socket gets re-used). * ConnectJobs are bounded by +SOCKET_POOL_CONNECT_JOB / - SOCKET_POOL_CONNECT_JOB events. * ConnectJobs log the net error they failed with. * Removed the SOCKET_BACKUP_TIMER_EXTENDED event. Review URL: http://codereview.chromium.org/2363003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48797 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_layer.cc')
-rw-r--r--net/http/http_network_layer.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/net/http/http_network_layer.cc b/net/http/http_network_layer.cc
index 87422d4..f661fde 100644
--- a/net/http/http_network_layer.cc
+++ b/net/http/http_network_layer.cc
@@ -25,13 +25,15 @@ HttpTransactionFactory* HttpNetworkLayer::CreateFactory(
HostResolver* host_resolver,
ProxyService* proxy_service,
SSLConfigService* ssl_config_service,
- HttpAuthHandlerFactory* http_auth_handler_factory) {
+ HttpAuthHandlerFactory* http_auth_handler_factory,
+ NetLog* net_log) {
DCHECK(proxy_service);
return new HttpNetworkLayer(ClientSocketFactory::GetDefaultFactory(),
network_change_notifier,
host_resolver, proxy_service, ssl_config_service,
- http_auth_handler_factory);
+ http_auth_handler_factory,
+ net_log);
}
// static
@@ -51,7 +53,8 @@ HttpNetworkLayer::HttpNetworkLayer(
HostResolver* host_resolver,
ProxyService* proxy_service,
SSLConfigService* ssl_config_service,
- HttpAuthHandlerFactory* http_auth_handler_factory)
+ HttpAuthHandlerFactory* http_auth_handler_factory,
+ NetLog* net_log)
: socket_factory_(socket_factory),
network_change_notifier_(network_change_notifier),
host_resolver_(host_resolver),
@@ -60,6 +63,7 @@ HttpNetworkLayer::HttpNetworkLayer(
session_(NULL),
spdy_session_pool_(NULL),
http_auth_handler_factory_(http_auth_handler_factory),
+ net_log_(net_log),
suspended_(false) {
DCHECK(proxy_service_);
DCHECK(ssl_config_service_.get());
@@ -72,6 +76,7 @@ HttpNetworkLayer::HttpNetworkLayer(HttpNetworkSession* session)
session_(session),
spdy_session_pool_(session->spdy_session_pool()),
http_auth_handler_factory_(NULL),
+ net_log_(NULL),
suspended_(false) {
DCHECK(session_.get());
}
@@ -108,13 +113,15 @@ HttpNetworkSession* HttpNetworkLayer::GetSession() {
session_ = new HttpNetworkSession(
network_change_notifier_, host_resolver_, proxy_service_,
socket_factory_, ssl_config_service_, spdy_pool,
- http_auth_handler_factory_);
+ http_auth_handler_factory_,
+ net_log_);
// These were just temps for lazy-initializing HttpNetworkSession.
network_change_notifier_ = NULL;
host_resolver_ = NULL;
proxy_service_ = NULL;
socket_factory_ = NULL;
http_auth_handler_factory_ = NULL;
+ net_log_ = NULL;
}
return session_;
}