| 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_http_job.h" | 5 #include "net/url_request/url_request_http_job.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 272 |
| 273 void URLRequestHttpJob::Kill() { | 273 void URLRequestHttpJob::Kill() { |
| 274 if (!transaction_.get()) | 274 if (!transaction_.get()) |
| 275 return; | 275 return; |
| 276 | 276 |
| 277 weak_factory_.InvalidateWeakPtrs(); | 277 weak_factory_.InvalidateWeakPtrs(); |
| 278 DestroyTransaction(); | 278 DestroyTransaction(); |
| 279 URLRequestJob::Kill(); | 279 URLRequestJob::Kill(); |
| 280 } | 280 } |
| 281 | 281 |
| 282 void URLRequestHttpJob::GetConnectionAttempts(ConnectionAttempts* out) const { |
| 283 if (transaction_) |
| 284 transaction_->GetConnectionAttempts(out); |
| 285 else |
| 286 out->clear(); |
| 287 } |
| 288 |
| 282 void URLRequestHttpJob::NotifyBeforeSendProxyHeadersCallback( | 289 void URLRequestHttpJob::NotifyBeforeSendProxyHeadersCallback( |
| 283 const ProxyInfo& proxy_info, | 290 const ProxyInfo& proxy_info, |
| 284 HttpRequestHeaders* request_headers) { | 291 HttpRequestHeaders* request_headers) { |
| 285 DCHECK(request_headers); | 292 DCHECK(request_headers); |
| 286 DCHECK_NE(URLRequestStatus::CANCELED, GetStatus().status()); | 293 DCHECK_NE(URLRequestStatus::CANCELED, GetStatus().status()); |
| 287 if (network_delegate()) { | 294 if (network_delegate()) { |
| 288 network_delegate()->NotifyBeforeSendProxyHeaders( | 295 network_delegate()->NotifyBeforeSendProxyHeaders( |
| 289 request_, | 296 request_, |
| 290 proxy_info, | 297 proxy_info, |
| 291 request_headers); | 298 request_headers); |
| (...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1482 return override_response_headers_.get() ? | 1489 return override_response_headers_.get() ? |
| 1483 override_response_headers_.get() : | 1490 override_response_headers_.get() : |
| 1484 transaction_->GetResponseInfo()->headers.get(); | 1491 transaction_->GetResponseInfo()->headers.get(); |
| 1485 } | 1492 } |
| 1486 | 1493 |
| 1487 void URLRequestHttpJob::NotifyURLRequestDestroyed() { | 1494 void URLRequestHttpJob::NotifyURLRequestDestroyed() { |
| 1488 awaiting_callback_ = false; | 1495 awaiting_callback_ = false; |
| 1489 } | 1496 } |
| 1490 | 1497 |
| 1491 } // namespace net | 1498 } // namespace net |
| OLD | NEW |