Index: net/url_request/url_request.cc |
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc |
index c2d0f4f6d6c6b85e69f9041f969dfcabf0bb6ef2..17ff311275f3a2cfb9e8714512d527ab33a8fe1b 100644 |
--- a/net/url_request/url_request.cc |
+++ b/net/url_request/url_request.cc |
@@ -8,6 +8,7 @@ |
#include "base/message_loop.h" |
#include "base/metrics/stats_counters.h" |
#include "base/singleton.h" |
+#include "base/utf_string_conversions.h" |
#include "net/base/load_flags.h" |
#include "net/base/net_errors.h" |
#include "net/base/net_log.h" |
@@ -70,6 +71,11 @@ void URLRequest::Delegate::OnAuthRequired(URLRequest* request, |
request->CancelAuth(); |
} |
+void URLRequest::Delegate::OnTLSLoginRequired( |
+ URLRequest* request, |
+ net::AuthChallengeInfo* login_request_info) { |
+} |
+ |
void URLRequest::Delegate::OnCertificateRequested( |
URLRequest* request, |
net::SSLCertRequestInfo* cert_request_info) { |
@@ -105,7 +111,8 @@ URLRequest::URLRequest(const GURL& url, Delegate* delegate) |
enable_profiling_(false), |
redirect_limit_(kMaxRedirects), |
final_upload_progress_(0), |
- priority_(net::LOWEST) { |
+ priority_(net::LOWEST), |
+ tls_login_auth_data_(new AuthData()) { |
SIMPLE_STATS_COUNTER("URLRequestCount"); |
// Sanity check out environment. |
@@ -504,6 +511,31 @@ void URLRequest::ContinueWithCertificate(net::X509Certificate* client_cert) { |
job_->ContinueWithCertificate(client_cert); |
} |
+void URLRequest::SetTLSLogin(const string16& username, |
+ const string16& password) { |
+ tls_login_auth_data_->username = username; |
+ tls_login_auth_data_->password = password; |
+ tls_login_auth_data_->state = AUTH_STATE_HAVE_AUTH; |
+} |
+ |
+AuthData* URLRequest::GetTLSLoginAuthData() { |
+ return tls_login_auth_data_.get(); |
+} |
+ |
+void URLRequest::CancelTLSLogin() { |
+ DCHECK(job_); |
+ |
+ job_->CancelTLSLogin(); |
+} |
+ |
+void URLRequest::ContinueWithTLSLogin() { |
+ DCHECK(job_); |
+ DCHECK(tls_login_auth_data_->state == AUTH_STATE_HAVE_AUTH); |
+ DCHECK(!tls_login_auth_data_->username.empty()); |
+ |
+ job_->ContinueWithTLSLogin(); |
+} |
+ |
void URLRequest::ContinueDespiteLastError() { |
DCHECK(job_); |