| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 } | 868 } |
| 869 | 869 |
| 870 void URLRequest::CancelAuth() { | 870 void URLRequest::CancelAuth() { |
| 871 DCHECK(job_.get()); | 871 DCHECK(job_.get()); |
| 872 DCHECK(job_->NeedsAuth()); | 872 DCHECK(job_->NeedsAuth()); |
| 873 | 873 |
| 874 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); | 874 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); |
| 875 job_->CancelAuth(); | 875 job_->CancelAuth(); |
| 876 } | 876 } |
| 877 | 877 |
| 878 void URLRequest::ContinueWithCertificate(X509Certificate* client_cert, | 878 void URLRequest::ContinueWithCertificate( |
| 879 SSLPrivateKey* client_private_key) { | 879 scoped_refptr<X509Certificate> client_cert, |
| 880 scoped_refptr<SSLPrivateKey> client_private_key) { |
| 880 DCHECK(job_.get()); | 881 DCHECK(job_.get()); |
| 881 | 882 |
| 882 // Matches the call in NotifyCertificateRequested. | 883 // Matches the call in NotifyCertificateRequested. |
| 883 OnCallToDelegateComplete(); | 884 OnCallToDelegateComplete(); |
| 884 | 885 |
| 885 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); | 886 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); |
| 886 job_->ContinueWithCertificate(client_cert, client_private_key); | 887 job_->ContinueWithCertificate(std::move(client_cert), |
| 888 std::move(client_private_key)); |
| 887 } | 889 } |
| 888 | 890 |
| 889 void URLRequest::ContinueDespiteLastError() { | 891 void URLRequest::ContinueDespiteLastError() { |
| 890 DCHECK(job_.get()); | 892 DCHECK(job_.get()); |
| 891 | 893 |
| 892 // Matches the call in NotifySSLCertificateError. | 894 // Matches the call in NotifySSLCertificateError. |
| 893 OnCallToDelegateComplete(); | 895 OnCallToDelegateComplete(); |
| 894 | 896 |
| 895 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); | 897 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); |
| 896 job_->ContinueDespiteLastError(); | 898 job_->ContinueDespiteLastError(); |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1206 out->clear(); | 1208 out->clear(); |
| 1207 } | 1209 } |
| 1208 | 1210 |
| 1209 void URLRequest::set_status(URLRequestStatus status) { | 1211 void URLRequest::set_status(URLRequestStatus status) { |
| 1210 DCHECK(status_.is_io_pending() || status_.is_success() || | 1212 DCHECK(status_.is_io_pending() || status_.is_success() || |
| 1211 (!status.is_success() && !status.is_io_pending())); | 1213 (!status.is_success() && !status.is_io_pending())); |
| 1212 status_ = status; | 1214 status_ = status; |
| 1213 } | 1215 } |
| 1214 | 1216 |
| 1215 } // namespace net | 1217 } // namespace net |
| OLD | NEW |