| 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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 void URLRequest::StartJob(URLRequestJob* job) { | 598 void URLRequest::StartJob(URLRequestJob* job) { |
| 599 // TODO(mmenke): Remove ScopedTracker below once crbug.com/456327 is fixed. | 599 // TODO(mmenke): Remove ScopedTracker below once crbug.com/456327 is fixed. |
| 600 tracked_objects::ScopedTracker tracking_profile( | 600 tracked_objects::ScopedTracker tracking_profile( |
| 601 FROM_HERE_WITH_EXPLICIT_FUNCTION("456327 URLRequest::StartJob")); | 601 FROM_HERE_WITH_EXPLICIT_FUNCTION("456327 URLRequest::StartJob")); |
| 602 | 602 |
| 603 DCHECK(!is_pending_); | 603 DCHECK(!is_pending_); |
| 604 DCHECK(!job_.get()); | 604 DCHECK(!job_.get()); |
| 605 | 605 |
| 606 net_log_.BeginEvent( | 606 net_log_.BeginEvent( |
| 607 NetLog::TYPE_URL_REQUEST_START_JOB, | 607 NetLog::TYPE_URL_REQUEST_START_JOB, |
| 608 base::Bind(&NetLogURLRequestStartCallback, | 608 base::Bind(NetLogURLRequestStartCallback, &url(), &method_, load_flags_, |
| 609 &url(), &method_, load_flags_, priority_, | 609 priority_, |
| 610 upload_data_stream_ ? upload_data_stream_->identifier() : -1)); | 610 upload_data_stream_ ? upload_data_stream_->identifier() : -1)); |
| 611 | 611 |
| 612 job_ = job; | 612 job_ = job; |
| 613 job_->SetExtraRequestHeaders(extra_request_headers_); | 613 job_->SetExtraRequestHeaders(extra_request_headers_); |
| 614 job_->SetPriority(priority_); | 614 job_->SetPriority(priority_); |
| 615 | 615 |
| 616 if (upload_data_stream_.get()) | 616 if (upload_data_stream_.get()) |
| 617 job_->SetUpload(upload_data_stream_.get()); | 617 job_->SetUpload(upload_data_stream_.get()); |
| 618 | 618 |
| 619 is_pending_ = true; | 619 is_pending_ = true; |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1190 } | 1190 } |
| 1191 | 1191 |
| 1192 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const { | 1192 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const { |
| 1193 if (job_) | 1193 if (job_) |
| 1194 job_->GetConnectionAttempts(out); | 1194 job_->GetConnectionAttempts(out); |
| 1195 else | 1195 else |
| 1196 out->clear(); | 1196 out->clear(); |
| 1197 } | 1197 } |
| 1198 | 1198 |
| 1199 } // namespace net | 1199 } // namespace net |
| OLD | NEW |