Index: chrome/browser/ui/login/login_prompt.cc |
diff --git a/chrome/browser/ui/login/login_prompt.cc b/chrome/browser/ui/login/login_prompt.cc |
index 380f7b559a9229350334e4c99bc899b83591010f..f3b7bc61aa7d028f1f771642574a47eddc321af2 100644 |
--- a/chrome/browser/ui/login/login_prompt.cc |
+++ b/chrome/browser/ui/login/login_prompt.cc |
@@ -350,7 +350,14 @@ void LoginHandler::SetAuthDeferred(const std::wstring& username, |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
if (request_) { |
- request_->SetAuth(WideToUTF16Hack(username), WideToUTF16Hack(password)); |
+ if (auth_info_->over_protocol == net::AUTH_OVER_TLS) { |
+ DCHECK_EQ(ASCIIToWide(net::kTLSSRPScheme), auth_info_->scheme); |
+ request_->SetTLSLogin(WideToUTF16Hack(username), |
+ WideToUTF16Hack(password)); |
+ request_->ContinueWithTLSLogin(); |
+ } else { |
+ request_->SetAuth(WideToUTF16Hack(username), WideToUTF16Hack(password)); |
+ } |
ResetLoginHandlerForRequest(request_); |
} |
} |
@@ -360,8 +367,14 @@ void LoginHandler::CancelAuthDeferred() { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
if (request_) { |
- request_->CancelAuth(); |
- // Verify that CancelAuth doesn't destroy the request via our delegate. |
+ if (auth_info_->over_protocol == net::AUTH_OVER_TLS) { |
+ DCHECK_EQ(ASCIIToWide(net::kTLSSRPScheme), auth_info_->scheme); |
+ request_->CancelTLSLogin(); |
+ } else { |
+ request_->CancelAuth(); |
+ } |
+ // Verify that CancelAuth/CancelTLSLogin doesn't destroy the request via |
+ // our delegate. |
DCHECK(request_ != NULL); |
ResetLoginHandlerForRequest(request_); |
} |
@@ -435,6 +448,8 @@ class LoginDialogTask : public Task { |
dialog_form.scheme = PasswordForm::SCHEME_BASIC; |
} else if (LowerCaseEqualsASCII(auth_info_->scheme, "digest")) { |
dialog_form.scheme = PasswordForm::SCHEME_DIGEST; |
+ } else if (LowerCaseEqualsASCII(auth_info_->scheme, net::kTLSSRPScheme)) { |
+ dialog_form.scheme = PasswordForm::SCHEME_TLS_SRP; |
} else { |
dialog_form.scheme = PasswordForm::SCHEME_OTHER; |
} |
@@ -446,6 +461,7 @@ class LoginDialogTask : public Task { |
origin = std::string("http://") + origin; |
dialog_form.origin = GURL(origin); |
} else if (net::GetHostAndPort(request_url_) != host_and_port) { |
+ LOG(INFO) << net::GetHostAndPort(request_url_) << " vs " << host_and_port; |
dialog_form.origin = GURL(); |
NOTREACHED(); // crbug.com/32718 |
} else { |