summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp')
-rw-r--r--Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp38
1 files changed, 31 insertions, 7 deletions
diff --git a/Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp b/Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp
index 8c5d26fc7..9bdd73b44 100644
--- a/Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp
+++ b/Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp
@@ -62,15 +62,19 @@ void AuthenticationChallengeProxy::useCredential(WebCredential* credential)
if (!m_challengeID)
return;
- if (!credential)
- m_connection->send(Messages::AuthenticationManager::ContinueWithoutCredentialForChallenge(m_challengeID), 0);
- else {
- WebCertificateInfo* certificateInfo = credential->certificateInfo();
- WebCore::CertificateInfo platformInfo = certificateInfo ? certificateInfo->certificateInfo() : WebCore::CertificateInfo();
- m_connection->send(Messages::AuthenticationManager::UseCredentialForChallenge(m_challengeID, credential->core(), platformInfo), 0);
+ uint64_t challengeID = m_challengeID;
+ m_challengeID = 0;
+
+ if (!credential) {
+ m_connection->send(Messages::AuthenticationManager::ContinueWithoutCredentialForChallenge(challengeID), 0);
+ return;
}
- m_challengeID = 0;
+ WebCore::CertificateInfo certificateInfo;
+ if (credential->certificateInfo())
+ certificateInfo = credential->certificateInfo()->certificateInfo();
+
+ m_connection->send(Messages::AuthenticationManager::UseCredentialForChallenge(challengeID, credential->credential(), certificateInfo), 0);
}
void AuthenticationChallengeProxy::cancel()
@@ -83,6 +87,26 @@ void AuthenticationChallengeProxy::cancel()
m_challengeID = 0;
}
+void AuthenticationChallengeProxy::performDefaultHandling()
+{
+ if (!m_challengeID)
+ return;
+
+ m_connection->send(Messages::AuthenticationManager::PerformDefaultHandling(m_challengeID), 0);
+
+ m_challengeID = 0;
+}
+
+void AuthenticationChallengeProxy::rejectProtectionSpaceAndContinue()
+{
+ if (!m_challengeID)
+ return;
+
+ m_connection->send(Messages::AuthenticationManager::RejectProtectionSpaceAndContinue(m_challengeID), 0);
+
+ m_challengeID = 0;
+}
+
WebCredential* AuthenticationChallengeProxy::proposedCredential() const
{
if (!m_webCredential)