OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/url_request/url_request.h" | 5 #include "net/url_request/url_request.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 } | 507 } |
508 } | 508 } |
509 | 509 |
510 void URLRequest::StartJob(URLRequestJob* job) { | 510 void URLRequest::StartJob(URLRequestJob* job) { |
511 DCHECK(!is_pending_); | 511 DCHECK(!is_pending_); |
512 DCHECK(!job_); | 512 DCHECK(!job_); |
513 | 513 |
514 net_log_.BeginEvent( | 514 net_log_.BeginEvent( |
515 NetLog::TYPE_URL_REQUEST_START_JOB, | 515 NetLog::TYPE_URL_REQUEST_START_JOB, |
516 base::Bind(&NetLogURLRequestStartCallback, | 516 base::Bind(&NetLogURLRequestStartCallback, |
517 &url(), &method_, load_flags_, priority_)); | 517 &url(), &method_, load_flags_, priority_, |
| 518 upload_.get() ? upload_->identifier() : -1)); |
518 | 519 |
519 job_ = job; | 520 job_ = job; |
520 job_->SetExtraRequestHeaders(extra_request_headers_); | 521 job_->SetExtraRequestHeaders(extra_request_headers_); |
521 | 522 |
522 if (upload_.get()) | 523 if (upload_.get()) |
523 job_->SetUpload(upload_.get()); | 524 job_->SetUpload(upload_.get()); |
524 | 525 |
525 is_pending_ = true; | 526 is_pending_ = true; |
526 | 527 |
527 response_info_.was_cached = false; | 528 response_info_.was_cached = false; |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 new base::debug::StackTrace(NULL, 0); | 967 new base::debug::StackTrace(NULL, 0); |
967 *stack_trace_copy = stack_trace; | 968 *stack_trace_copy = stack_trace; |
968 stack_trace_.reset(stack_trace_copy); | 969 stack_trace_.reset(stack_trace_copy); |
969 } | 970 } |
970 | 971 |
971 const base::debug::StackTrace* URLRequest::stack_trace() const { | 972 const base::debug::StackTrace* URLRequest::stack_trace() const { |
972 return stack_trace_.get(); | 973 return stack_trace_.get(); |
973 } | 974 } |
974 | 975 |
975 } // namespace net | 976 } // namespace net |
OLD | NEW |