Title: [227548] trunk/Source/WebKit
Revision
227548
Author
achristen...@apple.com
Date
2018-01-24 12:49:00 -0800 (Wed, 24 Jan 2018)

Log Message

Stop using AuthenticationClient in WebKit
https://bugs.webkit.org/show_bug.cgi?id=182016

Reviewed by Brady Eidson.

It was necessary to support ResourceHandle use in WebKit, but now we're using NetworkSession everywhere in WebKit.

* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::useCredentialForSingleChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
(WebKit::AuthenticationManager::cancelSingleChallenge):
(WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (227547 => 227548)


--- trunk/Source/WebKit/ChangeLog	2018-01-24 20:48:32 UTC (rev 227547)
+++ trunk/Source/WebKit/ChangeLog	2018-01-24 20:49:00 UTC (rev 227548)
@@ -1,5 +1,21 @@
 2018-01-24  Alex Christensen  <achristen...@webkit.org>
 
+        Stop using AuthenticationClient in WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=182016
+
+        Reviewed by Brady Eidson.
+
+        It was necessary to support ResourceHandle use in WebKit, but now we're using NetworkSession everywhere in WebKit.
+
+        * Shared/Authentication/AuthenticationManager.cpp:
+        (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
+        (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
+        (WebKit::AuthenticationManager::cancelSingleChallenge):
+        (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
+        (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
+
+2018-01-24  Alex Christensen  <achristen...@webkit.org>
+
         Remove WebProcess authentication code
         https://bugs.webkit.org/show_bug.cgi?id=182020
 

Modified: trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp (227547 => 227548)


--- trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp	2018-01-24 20:48:32 UTC (rev 227547)
+++ trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp	2018-01-24 20:49:00 UTC (rev 227548)
@@ -37,7 +37,6 @@
 #include "WebPage.h"
 #include "WebPageProxyMessages.h"
 #include <WebCore/AuthenticationChallenge.h>
-#include <WebCore/AuthenticationClient.h>
 
 using namespace WebCore;
 
@@ -162,18 +161,10 @@
     if (tryUseCertificateInfoForChallenge(challenge.challenge, certificateInfo, completionHandler))
         return;
 
-    AuthenticationClient* coreClient = challenge.challenge.authenticationClient();
-    // If there is a completion handler, then there is no AuthenticationClient.
-    // FIXME: Remove the use of AuthenticationClient in WebKit2 once NETWORK_SESSION is used for all loads.
-    if (completionHandler) {
-        ASSERT(!coreClient);
+    if (completionHandler)
         completionHandler(AuthenticationChallengeDisposition::UseCredential, credential);
-        return;
-    }
-    ASSERT(coreClient);
-
-    if (coreClient)
-        coreClient->receivedCredential(challenge.challenge, credential);
+    else
+        ASSERT_NOT_REACHED();
 }
 
 void AuthenticationManager::continueWithoutCredentialForChallenge(uint64_t challengeID)
@@ -189,16 +180,10 @@
     auto challenge = m_challenges.take(challengeID);
     ASSERT(!challenge.challenge.isNull());
 
-    AuthenticationClient* coreClient = challenge.challenge.authenticationClient();
-    if (challenge.completionHandler) {
-        ASSERT(!coreClient);
+    if (challenge.completionHandler)
         challenge.completionHandler(AuthenticationChallengeDisposition::UseCredential, Credential());
-        return;
-    }
-    ASSERT(coreClient);
-
-    if (coreClient)
-        coreClient->receivedRequestToContinueWithoutCredential(challenge.challenge);
+    else
+        ASSERT_NOT_REACHED();
 }
 
 void AuthenticationManager::cancelChallenge(uint64_t challengeID)
@@ -214,16 +199,10 @@
     auto challenge = m_challenges.take(challengeID);
     ASSERT(!challenge.challenge.isNull());
 
-    AuthenticationClient* coreClient = challenge.challenge.authenticationClient();
-    if (challenge.completionHandler) {
-        ASSERT(!coreClient);
+    if (challenge.completionHandler)
         challenge.completionHandler(AuthenticationChallengeDisposition::Cancel, Credential());
-        return;
-    }
-    ASSERT(coreClient);
-
-    if (coreClient)
-        coreClient->receivedCancellation(challenge.challenge);
+    else
+        ASSERT_NOT_REACHED();
 }
 
 void AuthenticationManager::performDefaultHandling(uint64_t challengeID)
@@ -239,16 +218,10 @@
     auto challenge = m_challenges.take(challengeID);
     ASSERT(!challenge.challenge.isNull());
 
-    AuthenticationClient* coreClient = challenge.challenge.authenticationClient();
-    if (challenge.completionHandler) {
-        ASSERT(!coreClient);
+    if (challenge.completionHandler)
         challenge.completionHandler(AuthenticationChallengeDisposition::PerformDefaultHandling, Credential());
-        return;
-    }
-    ASSERT(coreClient);
-
-    if (coreClient)
-        coreClient->receivedRequestToPerformDefaultHandling(challenge.challenge);
+    else
+        ASSERT_NOT_REACHED();
 }
 
 void AuthenticationManager::rejectProtectionSpaceAndContinue(uint64_t challengeID)
@@ -264,16 +237,10 @@
     auto challenge = m_challenges.take(challengeID);
     ASSERT(!challenge.challenge.isNull());
 
-    AuthenticationClient* coreClient = challenge.challenge.authenticationClient();
-    if (challenge.completionHandler) {
-        ASSERT(!coreClient);
+    if (challenge.completionHandler)
         challenge.completionHandler(AuthenticationChallengeDisposition::RejectProtectionSpace, Credential());
-        return;
-    }
-    ASSERT(coreClient);
-
-    if (coreClient)
-        coreClient->receivedChallengeRejection(challenge.challenge);
+    else
+        ASSERT_NOT_REACHED();
 }
 
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to