Title: [196600] trunk/Source/WebKit2
Revision
196600
Author
achristen...@apple.com
Date
2016-02-15 14:25:49 -0800 (Mon, 15 Feb 2016)

Log Message

Move Download authentication code to AuthenticationManager
https://bugs.webkit.org/show_bug.cgi?id=154132

Reviewed by Sam Weinig.

When a video element makes a request that receives an authentication challenge, the
AuthenticationManager receives an AuthenticationChallenge without an AuthenticationClient.
As a result, Download::receivedCredential and other functions were being called, which
sent a message to the challenge's sender.  This functionality is not specific to downloads,
so I moved it from Download to AuthenticationManager.

This fixes http/tests/media/video-auth.html when using NetworkSession 
because I use AuthenticationManager::receivedCredential if there is no AuthenticationClient
instead of improperly asserting that there is always an AuthenticationClient if there is no
completionHandler.

* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::platformDidFinish):
(WebKit::Download::receivedCredential): Deleted.
(WebKit::Download::receivedRequestToContinueWithoutCredential): Deleted.
(WebKit::Download::receivedCancellation): Deleted.
(WebKit::Download::receivedRequestToPerformDefaultHandling): Deleted.
(WebKit::Download::receivedChallengeRejection): Deleted.
* NetworkProcess/Downloads/mac/DownloadMac.mm:
(WebKit::Download::platformDidFinish):
(WebKit::Download::receivedCredential): Deleted.
(WebKit::Download::receivedRequestToContinueWithoutCredential): Deleted.
(WebKit::Download::receivedCancellation): Deleted.
(WebKit::Download::receivedRequestToPerformDefaultHandling): Deleted.
(WebKit::Download::receivedChallengeRejection): Deleted.
* NetworkProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::platformDidFinish):
(WebKit::Download::receivedCredential): Deleted.
(WebKit::Download::receivedRequestToContinueWithoutCredential): Deleted.
(WebKit::Download::receivedCancellation): Deleted.
(WebKit::Download::continueWithoutCredential): Deleted.
(WebKit::Download::useCredential): Deleted.
(WebKit::Download::cancelAuthenticationChallenge): Deleted.
(WebKit::Download::receivedRequestToPerformDefaultHandling): Deleted.
(WebKit::Download::receivedChallengeRejection): Deleted.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
(WebKit::AuthenticationManager::useCredentialForSingleChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
(WebKit::AuthenticationManager::cancelChallenge):
(WebKit::AuthenticationManager::cancelSingleChallenge):
(WebKit::AuthenticationManager::performDefaultHandling):
(WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
* Shared/Authentication/AuthenticationManager.h:
(WebKit::AuthenticationManager::outstandingAuthenticationChallengeCount):
* Shared/Authentication/cocoa: Added.
* Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm: Added.
(WebKit::AuthenticationManager::receivedCredential):
(WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
(WebKit::AuthenticationManager::receivedCancellation):
(WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
(WebKit::AuthenticationManager::receivedChallengeRejection):
* Shared/Authentication/soup: Added.
* Shared/Authentication/soup/AuthenticationManagerSoup.cpp: Added.
(WebKit::AuthenticationManager::receivedCredential):
(WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
(WebKit::AuthenticationManager::receivedCancellation):
(WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
(WebKit::AuthenticationManager::receivedChallengeRejection):
* WebKit2.xcodeproj/project.pbxproj:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (196599 => 196600)


--- trunk/Source/WebKit2/ChangeLog	2016-02-15 22:03:04 UTC (rev 196599)
+++ trunk/Source/WebKit2/ChangeLog	2016-02-15 22:25:49 UTC (rev 196600)
@@ -1,3 +1,78 @@
+2016-02-15  Alex Christensen  <achristen...@webkit.org>
+
+        Move Download authentication code to AuthenticationManager
+        https://bugs.webkit.org/show_bug.cgi?id=154132
+
+        Reviewed by Sam Weinig.
+
+        When a video element makes a request that receives an authentication challenge, the
+        AuthenticationManager receives an AuthenticationChallenge without an AuthenticationClient.
+        As a result, Download::receivedCredential and other functions were being called, which
+        sent a message to the challenge's sender.  This functionality is not specific to downloads,
+        so I moved it from Download to AuthenticationManager.
+
+        This fixes http/tests/media/video-auth.html when using NetworkSession 
+        because I use AuthenticationManager::receivedCredential if there is no AuthenticationClient
+        instead of improperly asserting that there is always an AuthenticationClient if there is no
+        completionHandler.
+
+        * NetworkProcess/Downloads/Download.h:
+        * NetworkProcess/Downloads/ios/DownloadIOS.mm:
+        (WebKit::Download::platformDidFinish):
+        (WebKit::Download::receivedCredential): Deleted.
+        (WebKit::Download::receivedRequestToContinueWithoutCredential): Deleted.
+        (WebKit::Download::receivedCancellation): Deleted.
+        (WebKit::Download::receivedRequestToPerformDefaultHandling): Deleted.
+        (WebKit::Download::receivedChallengeRejection): Deleted.
+        * NetworkProcess/Downloads/mac/DownloadMac.mm:
+        (WebKit::Download::platformDidFinish):
+        (WebKit::Download::receivedCredential): Deleted.
+        (WebKit::Download::receivedRequestToContinueWithoutCredential): Deleted.
+        (WebKit::Download::receivedCancellation): Deleted.
+        (WebKit::Download::receivedRequestToPerformDefaultHandling): Deleted.
+        (WebKit::Download::receivedChallengeRejection): Deleted.
+        * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
+        (WebKit::Download::platformDidFinish):
+        (WebKit::Download::receivedCredential): Deleted.
+        (WebKit::Download::receivedRequestToContinueWithoutCredential): Deleted.
+        (WebKit::Download::receivedCancellation): Deleted.
+        (WebKit::Download::continueWithoutCredential): Deleted.
+        (WebKit::Download::useCredential): Deleted.
+        (WebKit::Download::cancelAuthenticationChallenge): Deleted.
+        (WebKit::Download::receivedRequestToPerformDefaultHandling): Deleted.
+        (WebKit::Download::receivedChallengeRejection): Deleted.
+        * PlatformEfl.cmake:
+        * PlatformGTK.cmake:
+        * PlatformMac.cmake:
+        * Shared/Authentication/AuthenticationManager.cpp:
+        (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
+        (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
+        (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
+        (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
+        (WebKit::AuthenticationManager::cancelChallenge):
+        (WebKit::AuthenticationManager::cancelSingleChallenge):
+        (WebKit::AuthenticationManager::performDefaultHandling):
+        (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
+        (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
+        (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
+        * Shared/Authentication/AuthenticationManager.h:
+        (WebKit::AuthenticationManager::outstandingAuthenticationChallengeCount):
+        * Shared/Authentication/cocoa: Added.
+        * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm: Added.
+        (WebKit::AuthenticationManager::receivedCredential):
+        (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
+        (WebKit::AuthenticationManager::receivedCancellation):
+        (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
+        (WebKit::AuthenticationManager::receivedChallengeRejection):
+        * Shared/Authentication/soup: Added.
+        * Shared/Authentication/soup/AuthenticationManagerSoup.cpp: Added.
+        (WebKit::AuthenticationManager::receivedCredential):
+        (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
+        (WebKit::AuthenticationManager::receivedCancellation):
+        (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
+        (WebKit::AuthenticationManager::receivedChallengeRejection):
+        * WebKit2.xcodeproj/project.pbxproj:
+
 2016-02-15  Gyuyoung Kim  <gyuyoung....@webkit.org>
 
         [CMake][Mac] Remove WKNPAPIPlugInContainer.mm in WebKit2/PlatformMac.cmake

Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/Download.h (196599 => 196600)


--- trunk/Source/WebKit2/NetworkProcess/Downloads/Download.h	2016-02-15 22:03:04 UTC (rev 196599)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/Download.h	2016-02-15 22:25:49 UTC (rev 196600)
@@ -113,19 +113,6 @@
     DownloadAuthenticationClient* authenticationClient();
 #endif
 
-#if !USE(NETWORK_SESSION)
-    // Authentication
-    static void receivedCredential(const WebCore::AuthenticationChallenge&, const WebCore::Credential&);
-    static void receivedRequestToContinueWithoutCredential(const WebCore::AuthenticationChallenge&);
-    static void receivedCancellation(const WebCore::AuthenticationChallenge&);
-    static void receivedRequestToPerformDefaultHandling(const WebCore::AuthenticationChallenge&);
-    static void receivedChallengeRejection(const WebCore::AuthenticationChallenge&);
-
-    void useCredential(const WebCore::AuthenticationChallenge&, const WebCore::Credential&);
-    void continueWithoutCredential(const WebCore::AuthenticationChallenge&);
-    void cancelAuthenticationChallenge(const WebCore::AuthenticationChallenge&);
-#endif
-
 private:
     // IPC::MessageSender
     virtual IPC::Connection* messageSenderConnection() override;

Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/ios/DownloadIOS.mm (196599 => 196600)


--- trunk/Source/WebKit2/NetworkProcess/Downloads/ios/DownloadIOS.mm	2016-02-15 22:03:04 UTC (rev 196599)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/ios/DownloadIOS.mm	2016-02-15 22:25:49 UTC (rev 196600)
@@ -157,31 +157,6 @@
     notImplemented();
 }
 
-void Download::receivedCredential(const AuthenticationChallenge&, const Credential&)
-{
-    notImplemented();
-}
-
-void Download::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&)
-{
-    notImplemented();
-}
-
-void Download::receivedCancellation(const AuthenticationChallenge&)
-{
-    notImplemented();
-}
-
-void Download::receivedRequestToPerformDefaultHandling(const WebCore::AuthenticationChallenge&)
-{
-    notImplemented();
-}
-
-void Download::receivedChallengeRejection(const WebCore::AuthenticationChallenge&)
-{
-    notImplemented();
-}
-
 } // namespace WebKit
 
 #endif // USE(CFNETWORK) && !USE(NETWORK_SESSION)

Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm (196599 => 196600)


--- trunk/Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm	2016-02-15 22:03:04 UTC (rev 196599)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm	2016-02-15 22:25:49 UTC (rev 196600)
@@ -131,31 +131,6 @@
 {
 }
 
-void Download::receivedCredential(const AuthenticationChallenge& authenticationChallenge, const Credential& credential)
-{
-    [authenticationChallenge.sender() useCredential:credential.nsCredential() forAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-}
-
-void Download::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge& authenticationChallenge)
-{
-    [authenticationChallenge.sender() continueWithoutCredentialForAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-}
-
-void Download::receivedCancellation(const AuthenticationChallenge& authenticationChallenge)
-{
-    [authenticationChallenge.sender() cancelAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-}
-
-void Download::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge& authenticationChallenge)
-{
-    [authenticationChallenge.sender() performDefaultHandlingForAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-}
-
-void Download::receivedChallengeRejection(const AuthenticationChallenge& authenticationChallenge)
-{
-    [authenticationChallenge.sender() rejectProtectionSpaceAndContinueWithChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-}
-
 } // namespace WebKit
 
 @implementation WKDownloadAsDelegate

Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/soup/DownloadSoup.cpp (196599 => 196600)


--- trunk/Source/WebKit2/NetworkProcess/Downloads/soup/DownloadSoup.cpp	2016-02-15 22:03:04 UTC (rev 196599)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/soup/DownloadSoup.cpp	2016-02-15 22:25:49 UTC (rev 196600)
@@ -269,44 +269,4 @@
     m_resourceHandle = nullptr;
 }
 
-void Download::receivedCredential(const AuthenticationChallenge&, const Credential&)
-{
-    notImplemented();
-}
-
-void Download::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&)
-{
-    notImplemented();
-}
-
-void Download::receivedCancellation(const AuthenticationChallenge&)
-{
-    notImplemented();
-}
-
-void Download::continueWithoutCredential(const AuthenticationChallenge &)
-{
-    notImplemented();
-}
-
-void Download::useCredential(const AuthenticationChallenge&, const Credential&)
-{
-    notImplemented();
-}
-
-void Download::cancelAuthenticationChallenge(const AuthenticationChallenge&)
-{
-    notImplemented();
-}
-
-void Download::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&)
-{
-    notImplemented();
-}
-
-void Download::receivedChallengeRejection(const AuthenticationChallenge&)
-{
-    notImplemented();
-}
-
 } // namespace WebKit

Modified: trunk/Source/WebKit2/PlatformEfl.cmake (196599 => 196600)


--- trunk/Source/WebKit2/PlatformEfl.cmake	2016-02-15 22:03:04 UTC (rev 196599)
+++ trunk/Source/WebKit2/PlatformEfl.cmake	2016-02-15 22:25:49 UTC (rev 196600)
@@ -29,6 +29,8 @@
 
     Shared/API/c/efl/WKArrayEfl.cpp
 
+    Shared/Authentication/soup/AuthenticationManagerSoup.cpp
+
     Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp
     Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp
     Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp

Modified: trunk/Source/WebKit2/PlatformGTK.cmake (196599 => 196600)


--- trunk/Source/WebKit2/PlatformGTK.cmake	2016-02-15 22:03:04 UTC (rev 196599)
+++ trunk/Source/WebKit2/PlatformGTK.cmake	2016-02-15 22:25:49 UTC (rev 196600)
@@ -57,6 +57,8 @@
 
     Shared/API/c/cairo/WKImageCairo.cpp
 
+    Shared/Authentication/soup/AuthenticationManagerSoup.cpp
+
     Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
 
     Shared/Plugins/unix/PluginSearchPath.cpp

Modified: trunk/Source/WebKit2/PlatformMac.cmake (196599 => 196600)


--- trunk/Source/WebKit2/PlatformMac.cmake	2016-02-15 22:03:04 UTC (rev 196599)
+++ trunk/Source/WebKit2/PlatformMac.cmake	2016-02-15 22:25:49 UTC (rev 196600)
@@ -54,6 +54,8 @@
     Shared/APIWebArchive.mm
     Shared/APIWebArchiveResource.mm
 
+    Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm
+
     Shared/API/Cocoa/RemoteObjectInvocation.mm
     Shared/API/Cocoa/RemoteObjectRegistry.mm
     Shared/API/Cocoa/WKBrowsingContextHandle.mm

Modified: trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.cpp (196599 => 196600)


--- trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.cpp	2016-02-15 22:03:04 UTC (rev 196599)
+++ trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.cpp	2016-02-15 22:25:49 UTC (rev 196600)
@@ -116,7 +116,7 @@
     auto pageID = frame->page()->pageID();
     uint64_t challengeID = addChallengeToChallengeMap({pageID, authenticationChallenge
 #if USE(NETWORK_SESSION)
-        , ChallengeCompletionHandler()
+        , { }
 #endif
     });
 
@@ -161,7 +161,7 @@
 
     uint64_t challengeID = addChallengeToChallengeMap({pageID, authenticationChallenge
 #if USE(NETWORK_SESSION)
-        , ChallengeCompletionHandler()
+        , { }
 #endif
     });
 
@@ -219,17 +219,12 @@
         challenge.completionHandler(AuthenticationChallengeDisposition::UseCredential, credential);
         return;
     }
-#else
-    if (!coreClient) {
-        // FIXME: The authentication client is null for downloads, but it can also be null for canceled loads.
-        // We should not call Download::receivedCredential in the latter case.
-        Download::receivedCredential(challenge.challenge, credential);
-        return;
-    }
 #endif
 
-    ASSERT(coreClient);
-    coreClient->receivedCredential(challenge.challenge, credential);
+    if (coreClient)
+        coreClient->receivedCredential(challenge.challenge, credential);
+    else
+        receivedCredential(challenge.challenge, credential);
 }
 
 void AuthenticationManager::continueWithoutCredentialForChallenge(uint64_t challengeID)
@@ -252,17 +247,12 @@
         challenge.completionHandler(AuthenticationChallengeDisposition::UseCredential, Credential());
         return;
     }
-#else
-    if (!coreClient) {
-        // FIXME: The authentication client is null for downloads, but it can also be null for canceled loads.
-        // We should not call Download::receivedCredential in the latter case.
-        Download::receivedRequestToContinueWithoutCredential(challenge.challenge);
-        return;
-    }
 #endif
 
-    ASSERT(coreClient);
-    coreClient->receivedRequestToContinueWithoutCredential(challenge.challenge);
+    if (coreClient)
+        coreClient->receivedRequestToContinueWithoutCredential(challenge.challenge);
+    else
+        receivedRequestToContinueWithoutCredential(challenge.challenge);
 }
 
 void AuthenticationManager::cancelChallenge(uint64_t challengeID)
@@ -285,17 +275,12 @@
         challenge.completionHandler(AuthenticationChallengeDisposition::Cancel, Credential());
         return;
     }
-#else
-    if (!coreClient) {
-        // FIXME: The authentication client is null for downloads, but it can also be null for canceled loads.
-        // We should not call Download::receivedCredential in the latter case.
-        Download::receivedCancellation(challenge.challenge);
-        return;
-    }
 #endif
 
-    ASSERT(coreClient);
-    coreClient->receivedCancellation(challenge.challenge);
+    if (coreClient)
+        coreClient->receivedCancellation(challenge.challenge);
+    else
+        receivedCancellation(challenge.challenge);
 }
 
 void AuthenticationManager::performDefaultHandling(uint64_t challengeID)
@@ -318,17 +303,12 @@
         challenge.completionHandler(AuthenticationChallengeDisposition::PerformDefaultHandling, Credential());
         return;
     }
-#else
-    if (!coreClient) {
-        // FIXME: The authentication client is null for downloads, but it can also be null for canceled loads.
-        // We should not call Download::receivedCredential in the latter case.
-        Download::receivedRequestToPerformDefaultHandling(challenge.challenge);
-        return;
-    }
 #endif
 
-    ASSERT(coreClient);
-    coreClient->receivedRequestToPerformDefaultHandling(challenge.challenge);
+    if (coreClient)
+        coreClient->receivedRequestToPerformDefaultHandling(challenge.challenge);
+    else
+        receivedRequestToPerformDefaultHandling(challenge.challenge);
 }
 
 void AuthenticationManager::rejectProtectionSpaceAndContinue(uint64_t challengeID)
@@ -351,17 +331,12 @@
         challenge.completionHandler(AuthenticationChallengeDisposition::RejectProtectionSpace, Credential());
         return;
     }
-#else
-    if (!coreClient) {
-        // FIXME: The authentication client is null for downloads, but it can also be null for canceled loads.
-        // We should not call Download::receivedCredential in the latter case.
-        Download::receivedChallengeRejection(challenge.challenge);
-        return;
-    }
 #endif
 
-    ASSERT(coreClient);
-    coreClient->receivedChallengeRejection(challenge.challenge);
+    if (coreClient)
+        coreClient->receivedChallengeRejection(challenge.challenge);
+    else
+        receivedChallengeRejection(challenge.challenge);
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.h (196599 => 196600)


--- trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.h	2016-02-15 22:03:04 UTC (rev 196599)
+++ trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.h	2016-02-15 22:25:49 UTC (rev 196600)
@@ -76,6 +76,12 @@
 
     uint64_t outstandingAuthenticationChallengeCount() const { return m_challenges.size(); }
 
+    static void receivedCredential(const WebCore::AuthenticationChallenge&, const WebCore::Credential&);
+    static void receivedRequestToContinueWithoutCredential(const WebCore::AuthenticationChallenge&);
+    static void receivedCancellation(const WebCore::AuthenticationChallenge&);
+    static void receivedRequestToPerformDefaultHandling(const WebCore::AuthenticationChallenge&);
+    static void receivedChallengeRejection(const WebCore::AuthenticationChallenge&);
+
 private:
     struct Challenge {
         uint64_t pageID;

Added: trunk/Source/WebKit2/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm (0 => 196600)


--- trunk/Source/WebKit2/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm	2016-02-15 22:25:49 UTC (rev 196600)
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "AuthenticationManager.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void AuthenticationManager::receivedCredential(const AuthenticationChallenge& authenticationChallenge, const Credential& credential)
+{
+#if !USE(CFNETWORK)
+    [authenticationChallenge.sender() useCredential:credential.nsCredential() forAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
+#endif
+}
+
+void AuthenticationManager::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge& authenticationChallenge)
+{
+#if !USE(CFNETWORK)
+    [authenticationChallenge.sender() continueWithoutCredentialForAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
+#endif
+}
+
+void AuthenticationManager::receivedCancellation(const AuthenticationChallenge& authenticationChallenge)
+{
+#if !USE(CFNETWORK)
+    [authenticationChallenge.sender() cancelAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
+#endif
+}
+
+void AuthenticationManager::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge& authenticationChallenge)
+{
+#if !USE(CFNETWORK)
+    [authenticationChallenge.sender() performDefaultHandlingForAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
+#endif
+}
+
+void AuthenticationManager::receivedChallengeRejection(const AuthenticationChallenge& authenticationChallenge)
+{
+#if !USE(CFNETWORK)
+    [authenticationChallenge.sender() rejectProtectionSpaceAndContinueWithChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
+#endif
+}
+
+}

Added: trunk/Source/WebKit2/Shared/Authentication/soup/AuthenticationManagerSoup.cpp (0 => 196600)


--- trunk/Source/WebKit2/Shared/Authentication/soup/AuthenticationManagerSoup.cpp	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/Authentication/soup/AuthenticationManagerSoup.cpp	2016-02-15 22:25:49 UTC (rev 196600)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AuthenticationManager.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void AuthenticationManager::receivedCredential(const AuthenticationChallenge&, const Credential&)
+{
+}
+
+void AuthenticationManager::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&)
+{
+}
+
+void AuthenticationManager::receivedCancellation(const AuthenticationChallenge&)
+{
+}
+
+void AuthenticationManager::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&)
+{
+}
+
+void AuthenticationManager::receivedChallengeRejection(const AuthenticationChallenge&)
+{
+}
+
+}

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (196599 => 196600)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2016-02-15 22:03:04 UTC (rev 196599)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2016-02-15 22:25:49 UTC (rev 196600)
@@ -1028,6 +1028,7 @@
 		52D5A1B01C57495A00DE34A3 /* WebVideoFullscreenManagerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 52D5A1AA1C57494E00DE34A3 /* WebVideoFullscreenManagerProxy.h */; };
 		52D5A1B11C57496200DE34A3 /* WebVideoFullscreenManagerProxy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 52D5A1AC1C57494E00DE34A3 /* WebVideoFullscreenManagerProxy.mm */; };
 		52D5A1B71C574A0200DE34A3 /* WebVideoFullscreenManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 52D5A1B41C5749F200DE34A3 /* WebVideoFullscreenManager.mm */; };
+		5C052F261C6D3BD30076E919 /* AuthenticationManagerCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C052F241C6D3AB60076E919 /* AuthenticationManagerCocoa.mm */; };
 		5C1426EC1C23F80900D41183 /* NetworkProcessCreationParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C1426E21C23F80500D41183 /* NetworkProcessCreationParameters.cpp */; };
 		5C1426ED1C23F80900D41183 /* NetworkProcessCreationParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1426E31C23F80500D41183 /* NetworkProcessCreationParameters.h */; };
 		5C1426EE1C23F80900D41183 /* NetworkProcessSupplement.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1426E41C23F80500D41183 /* NetworkProcessSupplement.h */; };
@@ -3049,6 +3050,7 @@
 		52D5A1B21C5749F200DE34A3 /* WebVideoFullscreenManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVideoFullscreenManager.h; sourceTree = "<group>"; };
 		52D5A1B31C5749F200DE34A3 /* WebVideoFullscreenManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebVideoFullscreenManager.messages.in; sourceTree = "<group>"; };
 		52D5A1B41C5749F200DE34A3 /* WebVideoFullscreenManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebVideoFullscreenManager.mm; sourceTree = "<group>"; };
+		5C052F241C6D3AB60076E919 /* AuthenticationManagerCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AuthenticationManagerCocoa.mm; path = Authentication/cocoa/AuthenticationManagerCocoa.mm; sourceTree = "<group>"; };
 		5C1426E21C23F80500D41183 /* NetworkProcessCreationParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkProcessCreationParameters.cpp; path = NetworkProcess/NetworkProcessCreationParameters.cpp; sourceTree = "<group>"; };
 		5C1426E31C23F80500D41183 /* NetworkProcessCreationParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkProcessCreationParameters.h; path = NetworkProcess/NetworkProcessCreationParameters.h; sourceTree = "<group>"; };
 		5C1426E41C23F80500D41183 /* NetworkProcessSupplement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkProcessSupplement.h; path = NetworkProcess/NetworkProcessSupplement.h; sourceTree = "<group>"; };
@@ -5395,6 +5397,7 @@
 		518E8EF116B208F000E91429 /* Authentication */ = {
 			isa = PBXGroup;
 			children = (
+				5C052F231C6D3AA10076E919 /* cocoa */,
 				518E8EF616B2091C00E91429 /* mac */,
 				518E8EF316B2091C00E91429 /* AuthenticationManager.cpp */,
 				518E8EF416B2091C00E91429 /* AuthenticationManager.h */,
@@ -5512,6 +5515,14 @@
 			name = IconDatabase;
 			sourceTree = "<group>";
 		};
+		5C052F231C6D3AA10076E919 /* cocoa */ = {
+			isa = PBXGroup;
+			children = (
+				5C052F241C6D3AB60076E919 /* AuthenticationManagerCocoa.mm */,
+			);
+			name = cocoa;
+			sourceTree = "<group>";
+		};
 		5C1426F11C23F81700D41183 /* Downloads */ = {
 			isa = PBXGroup;
 			children = (
@@ -8930,6 +8941,7 @@
 				BC8ACA1416670D89004C1941 /* ObjCObjectGraph.mm in Sources */,
 				BCCF673312C7F15C008F9C35 /* OriginAndDatabases.cpp in Sources */,
 				7C387434172F5615001BD88A /* PageBanner.cpp in Sources */,
+				5C052F261C6D3BD30076E919 /* AuthenticationManagerCocoa.mm in Sources */,
 				7C6D37FC172F555F009D2847 /* PageBannerMac.mm in Sources */,
 				0FCB4E6318BBE3D9000FCFC9 /* PageClientImpl.mm in Sources */,
 				0FCB4E4718BBE044000FCFC9 /* PageClientImplIOS.mm in Sources */,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to