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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 6592027: Update NetLog in preparation for late binding of HttpStream jobs to requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits. Created 9 years, 10 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/http/http_stream_factory_impl_job.h ('k') | net/http/http_stream_factory_impl_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index 6884a7928cf8d33d2632a7fc2c4f7457f360b6fd..8ae5f82b91e3f21b463297142d128e08675eba21 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -9,6 +9,7 @@
#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
+#include "base/values.h"
#include "net/base/connection_type_histograms.h"
#include "net/base/net_log.h"
#include "net/base/net_util.h"
@@ -76,6 +77,8 @@ HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory,
}
HttpStreamFactoryImpl::Job::~Job() {
+ net_log_.EndEvent(NetLog::TYPE_HTTP_STREAM_JOB, NULL);
+
// When we're in a partially constructed state, waiting for the user to
// provide certificate handling information or authentication, we can't reuse
// this stream at all.
@@ -164,7 +167,8 @@ void HttpStreamFactoryImpl::Job::OnStreamReadyCallback() {
DCHECK(stream_.get());
request_->Complete(was_alternate_protocol_available(),
was_npn_negotiated(),
- using_spdy());
+ using_spdy(),
+ net_log_.source());
request_->OnStreamReady(ssl_config_, proxy_info_, stream_.release());
// |this| may be deleted after this call.
}
@@ -375,7 +379,11 @@ int HttpStreamFactoryImpl::Job::StartInternal(
CHECK_EQ(STATE_NONE, next_state_);
request_info_ = request_info;
ssl_config_ = ssl_config;
- net_log_ = net_log;
+ net_log_ = BoundNetLog::Make(net_log.net_log(),
+ NetLog::SOURCE_HTTP_STREAM_JOB);
+ net_log_.BeginEvent(NetLog::TYPE_HTTP_STREAM_JOB,
+ make_scoped_refptr(new NetLogStringParameter(
+ "url", request_info.url.GetOrigin().spec())));
next_state_ = STATE_RESOLVE_PROXY;
int rv = RunLoop(OK);
DCHECK_EQ(ERR_IO_PENDING, rv);
« no previous file with comments | « net/http/http_stream_factory_impl_job.h ('k') | net/http/http_stream_factory_impl_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698