| 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 StartJob(URLRequestJobManager::GetInstance()->CreateJob(this)); | 438 StartJob(URLRequestJobManager::GetInstance()->CreateJob(this)); |
| 439 } | 439 } |
| 440 } | 440 } |
| 441 | 441 |
| 442 void URLRequest::StartJob(URLRequestJob* job) { | 442 void URLRequest::StartJob(URLRequestJob* job) { |
| 443 DCHECK(!is_pending_); | 443 DCHECK(!is_pending_); |
| 444 DCHECK(!job_); | 444 DCHECK(!job_); |
| 445 | 445 |
| 446 net_log_.BeginEvent( | 446 net_log_.BeginEvent( |
| 447 NetLog::TYPE_URL_REQUEST_START_JOB, | 447 NetLog::TYPE_URL_REQUEST_START_JOB, |
| 448 make_scoped_refptr(new URLRequestStartEventParameters( | 448 base::Bind(&NetLogURLRequestStartCallback, |
| 449 url(), method_, load_flags_, priority_))); | 449 &url(), &method_, load_flags_, priority_)); |
| 450 | 450 |
| 451 job_ = job; | 451 job_ = job; |
| 452 job_->SetExtraRequestHeaders(extra_request_headers_); | 452 job_->SetExtraRequestHeaders(extra_request_headers_); |
| 453 | 453 |
| 454 if (upload_.get()) | 454 if (upload_.get()) |
| 455 job_->SetUpload(upload_.get()); | 455 job_->SetUpload(upload_.get()); |
| 456 | 456 |
| 457 is_pending_ = true; | 457 is_pending_ = true; |
| 458 | 458 |
| 459 response_info_.was_cached = false; | 459 response_info_.was_cached = false; |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 new base::debug::StackTrace(NULL, 0); | 922 new base::debug::StackTrace(NULL, 0); |
| 923 *stack_trace_copy = stack_trace; | 923 *stack_trace_copy = stack_trace; |
| 924 stack_trace_.reset(stack_trace_copy); | 924 stack_trace_.reset(stack_trace_copy); |
| 925 } | 925 } |
| 926 | 926 |
| 927 const base::debug::StackTrace* URLRequest::stack_trace() const { | 927 const base::debug::StackTrace* URLRequest::stack_trace() const { |
| 928 return stack_trace_.get(); | 928 return stack_trace_.get(); |
| 929 } | 929 } |
| 930 | 930 |
| 931 } // namespace net | 931 } // namespace net |
| OLD | NEW |