Chromium Code Reviews| 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 a1f802dc390bdbac7ae43494193a57e9d80dd466..f0d3a4f75591622553402605ea1776f029ffa85c 100644 |
| --- a/net/http/http_stream_factory_impl_job.cc |
| +++ b/net/http/http_stream_factory_impl_job.cc |
| @@ -50,12 +50,15 @@ namespace net { |
| // Returns parameters associated with the start of a HTTP stream job. |
| scoped_ptr<base::Value> NetLogHttpStreamJobCallback( |
| + const NetLog::Source& source, |
| const GURL* original_url, |
| const GURL* url, |
| const AlternativeService* alternative_service, |
| RequestPriority priority, |
| NetLogCaptureMode /* capture_mode */) { |
| scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| + if (source.IsValid()) |
| + source.AddToEventParameters(dict.get()); |
| dict->SetString("original_url", original_url->GetOrigin().spec()); |
| dict->SetString("url", url->GetOrigin().spec()); |
| dict->SetString("alternative_service", alternative_service->ToString()); |
| @@ -227,6 +230,7 @@ void HttpStreamFactoryImpl::Job::Resume(Job* job) { |
| void HttpStreamFactoryImpl::Job::Orphan(const Request* request) { |
| DCHECK_EQ(request_, request); |
| request_ = NULL; |
| + net_log_.AddEvent(NetLog::TYPE_HTTP_STREAM_JOB_ORPHANED); |
| if (blocking_job_) { |
| // We've been orphaned, but there's a job we're blocked on. Don't bother |
| // racing, just cancel ourself. |
| @@ -667,8 +671,14 @@ int HttpStreamFactoryImpl::Job::DoStart() { |
| net_log_.BeginEvent( |
| NetLog::TYPE_HTTP_STREAM_JOB, |
|
mmenke
2015/06/25 23:23:27
Should update the docs for this method's parameter
davidben
2015/06/26 16:35:43
Done.
|
| - base::Bind(&NetLogHttpStreamJobCallback, &request_info_.url, &origin_url_, |
| - &alternative_service_, priority_)); |
| + base::Bind(&NetLogHttpStreamJobCallback, |
| + request_ ? request_->net_log().source() : NetLog::Source(), |
| + &request_info_.url, &origin_url_, &alternative_service_, |
| + priority_)); |
| + if (request_) { |
| + request_->net_log().AddEvent(NetLog::TYPE_HTTP_STREAM_REQUEST_STARTED_JOB, |
| + net_log_.source().ToEventParametersCallback()); |
| + } |
| // Don't connect to restricted ports. |
| if (!IsPortAllowedForScheme(server_.port(), request_info_.url.scheme())) { |