| 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 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 } | 865 } |
| 866 | 866 |
| 867 void URLRequest::CancelAuth() { | 867 void URLRequest::CancelAuth() { |
| 868 DCHECK(job_.get()); | 868 DCHECK(job_.get()); |
| 869 DCHECK(job_->NeedsAuth()); | 869 DCHECK(job_->NeedsAuth()); |
| 870 | 870 |
| 871 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); | 871 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); |
| 872 job_->CancelAuth(); | 872 job_->CancelAuth(); |
| 873 } | 873 } |
| 874 | 874 |
| 875 void URLRequest::ContinueWithCertificate(X509Certificate* client_cert, | 875 void URLRequest::ContinueWithCertificate( |
| 876 SSLPrivateKey* client_private_key) { | 876 scoped_refptr<X509Certificate> client_cert, |
| 877 scoped_refptr<SSLPrivateKey> client_private_key) { |
| 877 DCHECK(job_.get()); | 878 DCHECK(job_.get()); |
| 878 | 879 |
| 879 // Matches the call in NotifyCertificateRequested. | 880 // Matches the call in NotifyCertificateRequested. |
| 880 OnCallToDelegateComplete(); | 881 OnCallToDelegateComplete(); |
| 881 | 882 |
| 882 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); | 883 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); |
| 883 job_->ContinueWithCertificate(client_cert, client_private_key); | 884 job_->ContinueWithCertificate(std::move(client_cert), |
| 885 std::move(client_private_key)); |
| 884 } | 886 } |
| 885 | 887 |
| 886 void URLRequest::ContinueDespiteLastError() { | 888 void URLRequest::ContinueDespiteLastError() { |
| 887 DCHECK(job_.get()); | 889 DCHECK(job_.get()); |
| 888 | 890 |
| 889 // Matches the call in NotifySSLCertificateError. | 891 // Matches the call in NotifySSLCertificateError. |
| 890 OnCallToDelegateComplete(); | 892 OnCallToDelegateComplete(); |
| 891 | 893 |
| 892 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); | 894 status_ = URLRequestStatus::FromError(ERR_IO_PENDING); |
| 893 job_->ContinueDespiteLastError(); | 895 job_->ContinueDespiteLastError(); |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 out->clear(); | 1215 out->clear(); |
| 1214 } | 1216 } |
| 1215 | 1217 |
| 1216 void URLRequest::set_status(URLRequestStatus status) { | 1218 void URLRequest::set_status(URLRequestStatus status) { |
| 1217 DCHECK(status_.is_io_pending() || status_.is_success() || | 1219 DCHECK(status_.is_io_pending() || status_.is_success() || |
| 1218 (!status.is_success() && !status.is_io_pending())); | 1220 (!status.is_success() && !status.is_io_pending())); |
| 1219 status_ = status; | 1221 status_ = status; |
| 1220 } | 1222 } |
| 1221 | 1223 |
| 1222 } // namespace net | 1224 } // namespace net |
| OLD | NEW |