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

Unified Diff: net/http/http_stream_factory_impl_request.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_request.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_request.cc
diff --git a/net/http/http_stream_factory_impl_request.cc b/net/http/http_stream_factory_impl_request.cc
index 7826659ba3185af254f1cea9f476ea1c20bda4a8..b6e6b9f6544eed9093ec4bd83559d22ae7c552ec 100644
--- a/net/http/http_stream_factory_impl_request.cc
+++ b/net/http/http_stream_factory_impl_request.cc
@@ -12,10 +12,12 @@ namespace net {
HttpStreamFactoryImpl::Request::Request(const GURL& url,
HttpStreamFactoryImpl* factory,
- HttpStreamRequest::Delegate* delegate)
+ HttpStreamRequest::Delegate* delegate,
+ const BoundNetLog& net_log)
: url_(url),
factory_(factory),
delegate_(delegate),
+ net_log_(net_log),
job_(NULL),
completed_(false),
was_alternate_protocol_available_(false),
@@ -23,9 +25,13 @@ HttpStreamFactoryImpl::Request::Request(const GURL& url,
using_spdy_(false) {
DCHECK(factory_);
DCHECK(delegate_);
+
+ net_log_.BeginEvent(NetLog::TYPE_HTTP_STREAM_REQUEST, NULL);
}
HttpStreamFactoryImpl::Request::~Request() {
+ net_log_.EndEvent(NetLog::TYPE_HTTP_STREAM_REQUEST, NULL);
+
factory_->request_map_.erase(job_);
// TODO(willchan): Remove this when we decouple requests and jobs.
@@ -53,12 +59,17 @@ void HttpStreamFactoryImpl::Request::BindJob(HttpStreamFactoryImpl::Job* job) {
void HttpStreamFactoryImpl::Request::Complete(
bool was_alternate_protocol_available,
bool was_npn_negotiated,
- bool using_spdy) {
+ bool using_spdy,
+ const NetLog::Source& job_source) {
DCHECK(!completed_);
completed_ = true;
was_alternate_protocol_available_ = was_alternate_protocol_available;
was_npn_negotiated_ = was_npn_negotiated;
using_spdy_ = using_spdy;
+ net_log_.AddEvent(
+ NetLog::TYPE_HTTP_STREAM_REQUEST_BOUND_TO_JOB,
+ make_scoped_refptr(new NetLogSourceParameter(
+ "source_dependency", job_source)));
}
void HttpStreamFactoryImpl::Request::OnStreamReady(
« no previous file with comments | « net/http/http_stream_factory_impl_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698