Title: [206583] trunk/Source/WebKit2
Revision
206583
Author
[email protected]
Date
2016-09-29 08:30:33 -0700 (Thu, 29 Sep 2016)

Log Message

NetworkSession: HTTP authentication doesn't work if PROTECTION_SPACE_AUTH_CALLBACK is not enabled
https://bugs.webkit.org/show_bug.cgi?id=162724

Reviewed by Alex Christensen.

NetworkLoad always expects continueCanAuthenticateAgainstProtectionSpace() to be called to complete the
authentication challenge, which is only defined when PROTECTION_SPACE_AUTH_CALLBACK is enabled.
I've added missing #ifdefs for PROTECTION_SPACE_AUTH_CALLBACK.

* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
* NetworkProcess/Downloads/DownloadManager.h:
* NetworkProcess/Downloads/PendingDownload.cpp:
(WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace):
* NetworkProcess/Downloads/PendingDownload.h:
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::~NetworkLoad):
(WebKit::NetworkLoad::didReceiveChallenge): Call completeAuthenticationChallenge() instead of
canAuthenticateAgainstProtectionSpaceAsync() when PROTECTION_SPACE_AUTH_CALLBACK is not enabled.
(WebKit::NetworkLoad::completeAuthenticationChallenge): Moved common code to complete the authentication
challenge from continueCanAuthenticateAgainstProtectionSpace().
(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace): Call completeAuthenticationChallenge().
(WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkLoadClient.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpaceDownload):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
(WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
* Shared/Authentication/AuthenticationManager.h:
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace):
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/Downloads/DownloadProxy.messages.in:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (206582 => 206583)


--- trunk/Source/WebKit2/ChangeLog	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/ChangeLog	2016-09-29 15:30:33 UTC (rev 206583)
@@ -1,3 +1,45 @@
+2016-09-29  Carlos Garcia Campos  <[email protected]>
+
+        NetworkSession: HTTP authentication doesn't work if PROTECTION_SPACE_AUTH_CALLBACK is not enabled
+        https://bugs.webkit.org/show_bug.cgi?id=162724
+
+        Reviewed by Alex Christensen.
+
+        NetworkLoad always expects continueCanAuthenticateAgainstProtectionSpace() to be called to complete the
+        authentication challenge, which is only defined when PROTECTION_SPACE_AUTH_CALLBACK is enabled.
+        I've added missing #ifdefs for PROTECTION_SPACE_AUTH_CALLBACK.
+
+        * NetworkProcess/Downloads/DownloadManager.cpp:
+        (WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
+        * NetworkProcess/Downloads/DownloadManager.h:
+        * NetworkProcess/Downloads/PendingDownload.cpp:
+        (WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace):
+        * NetworkProcess/Downloads/PendingDownload.h:
+        * NetworkProcess/NetworkLoad.cpp:
+        (WebKit::NetworkLoad::~NetworkLoad):
+        (WebKit::NetworkLoad::didReceiveChallenge): Call completeAuthenticationChallenge() instead of
+        canAuthenticateAgainstProtectionSpaceAsync() when PROTECTION_SPACE_AUTH_CALLBACK is not enabled.
+        (WebKit::NetworkLoad::completeAuthenticationChallenge): Moved common code to complete the authentication
+        challenge from continueCanAuthenticateAgainstProtectionSpace().
+        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace): Call completeAuthenticationChallenge().
+        (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
+        * NetworkProcess/NetworkLoad.h:
+        * NetworkProcess/NetworkLoadClient.h:
+        * NetworkProcess/NetworkProcess.cpp:
+        (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpaceDownload):
+        * NetworkProcess/NetworkProcess.h:
+        * NetworkProcess/NetworkProcess.messages.in:
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
+        (WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
+        * NetworkProcess/NetworkResourceLoader.h:
+        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
+        * Shared/Authentication/AuthenticationManager.h:
+        * UIProcess/Downloads/DownloadProxy.cpp:
+        (WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace):
+        * UIProcess/Downloads/DownloadProxy.h:
+        * UIProcess/Downloads/DownloadProxy.messages.in:
+
 2016-09-28  Joseph Pecoraro  <[email protected]>
 
         WKSharedAPICast should not warn about acceptable custom context menu tag values

Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/DownloadManager.cpp (206582 => 206583)


--- trunk/Source/WebKit2/NetworkProcess/Downloads/DownloadManager.cpp	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/DownloadManager.cpp	2016-09-29 15:30:33 UTC (rev 206583)
@@ -80,7 +80,8 @@
     m_downloads.add(downloadID, WTFMove(download));
     return std::make_pair(WTFMove(downloadAfterLocationDecided), WTFMove(pendingDownload));
 }
-    
+
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
 void DownloadManager::continueCanAuthenticateAgainstProtectionSpace(DownloadID downloadID, bool canAuthenticate)
 {
     auto* pendingDownload = m_pendingDownloads.get(downloadID);
@@ -88,6 +89,7 @@
     if (pendingDownload)
         pendingDownload->continueCanAuthenticateAgainstProtectionSpace(canAuthenticate);
 }
+#endif
 
 void DownloadManager::continueWillSendRequest(DownloadID downloadID, WebCore::ResourceRequest&& request)
 {

Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/DownloadManager.h (206582 => 206583)


--- trunk/Source/WebKit2/NetworkProcess/Downloads/DownloadManager.h	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/DownloadManager.h	2016-09-29 15:30:33 UTC (rev 206583)
@@ -75,7 +75,9 @@
     void startDownload(WebCore::SessionID, DownloadID, const WebCore::ResourceRequest&, const String& suggestedName = { });
 #if USE(NETWORK_SESSION)
     std::pair<RefPtr<NetworkDataTask>, std::unique_ptr<PendingDownload>> dataTaskBecameDownloadTask(DownloadID, std::unique_ptr<Download>&&);
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     void continueCanAuthenticateAgainstProtectionSpace(DownloadID, bool canAuthenticate);
+#endif
     void continueWillSendRequest(DownloadID, WebCore::ResourceRequest&&);
     void willDecidePendingDownloadDestination(NetworkDataTask&, ResponseCompletionHandler&&);
 #endif

Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/PendingDownload.cpp (206582 => 206583)


--- trunk/Source/WebKit2/NetworkProcess/Downloads/PendingDownload.cpp	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/PendingDownload.cpp	2016-09-29 15:30:33 UTC (rev 206583)
@@ -56,6 +56,7 @@
     m_networkLoad->continueWillSendRequest(WTFMove(newRequest));
 }
 
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
 void PendingDownload::canAuthenticateAgainstProtectionSpaceAsync(const WebCore::ProtectionSpace& protectionSpace)
 {
     send(Messages::DownloadProxy::CanAuthenticateAgainstProtectionSpace(protectionSpace));
@@ -65,6 +66,7 @@
 {
     m_networkLoad->continueCanAuthenticateAgainstProtectionSpace(canAuthenticate);
 }
+#endif
 
 void PendingDownload::didBecomeDownload()
 {

Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/PendingDownload.h (206582 => 206583)


--- trunk/Source/WebKit2/NetworkProcess/Downloads/PendingDownload.h	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/PendingDownload.h	2016-09-29 15:30:33 UTC (rev 206583)
@@ -48,12 +48,16 @@
     PendingDownload(NetworkLoadParameters&&, DownloadID, NetworkSession&, const String& suggestedName);
 
     void continueWillSendRequest(WebCore::ResourceRequest&&);
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     void continueCanAuthenticateAgainstProtectionSpace(bool canAuthenticate);
+#endif
 
 private:    
     // NetworkLoadClient.
     void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent) override { }
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     void canAuthenticateAgainstProtectionSpaceAsync(const WebCore::ProtectionSpace&) override;
+#endif
     bool isSynchronous() const override { return false; }
     void willSendRedirectedRequest(WebCore::ResourceRequest&&, WebCore::ResourceRequest&& redirectRequest, WebCore::ResourceResponse&& redirectResponse) override;
     ShouldContinueDidReceiveResponse didReceiveResponse(WebCore::ResourceResponse&&) override { return ShouldContinueDidReceiveResponse::No; };

Modified: trunk/Source/WebKit2/NetworkProcess/NetworkLoad.cpp (206582 => 206583)


--- trunk/Source/WebKit2/NetworkProcess/NetworkLoad.cpp	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkLoad.cpp	2016-09-29 15:30:33 UTC (rev 206583)
@@ -76,8 +76,10 @@
 #if USE(NETWORK_SESSION)
     if (m_responseCompletionHandler)
         m_responseCompletionHandler(PolicyIgnore);
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     if (m_challengeCompletionHandler)
         m_challengeCompletionHandler(AuthenticationChallengeDisposition::Cancel, { });
+#endif
     if (m_task)
         m_task->clearClient();
 #elif USE(PROTECTION_SPACE_AUTH_CALLBACK)
@@ -226,6 +228,7 @@
 void NetworkLoad::didReceiveChallenge(const AuthenticationChallenge& challenge, ChallengeCompletionHandler&& completionHandler)
 {
     // Handle server trust evaluation at platform-level if requested, for performance reasons.
+#if PLATFORM(COCOA)
     if (challenge.protectionSpace().authenticationScheme() == ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested
         && !NetworkProcess::singleton().canHandleHTTPSServerTrustEvaluation()) {
         if (m_task && m_task->allowsSpecificHTTPSCertificateForHost(challenge))
@@ -234,13 +237,33 @@
             completionHandler(AuthenticationChallengeDisposition::RejectProtectionSpace, { });
         return;
     }
+#endif
 
+    m_challenge = challenge;
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     m_challengeCompletionHandler = WTFMove(completionHandler);
-    m_challenge = challenge;
-
     m_client.canAuthenticateAgainstProtectionSpaceAsync(challenge.protectionSpace());
+#else
+    completeAuthenticationChallenge(WTFMove(completionHandler));
+#endif
 }
 
+void NetworkLoad::completeAuthenticationChallenge(ChallengeCompletionHandler&& completionHandler)
+{
+    if (m_parameters.clientCredentialPolicy == ClientCredentialPolicy::CannotAskClientForCredentials) {
+        completionHandler(AuthenticationChallengeDisposition::UseCredential, { });
+        return;
+    }
+
+    if (!m_task)
+        return;
+
+    if (auto* pendingDownload = m_task->pendingDownload())
+        NetworkProcess::singleton().authenticationManager().didReceiveAuthenticationChallenge(*pendingDownload, *m_challenge, WTFMove(completionHandler));
+    else
+        NetworkProcess::singleton().authenticationManager().didReceiveAuthenticationChallenge(m_parameters.webPageID, m_parameters.webFrameID, *m_challenge, WTFMove(completionHandler));
+}
+
 void NetworkLoad::didReceiveResponseNetworkSession(ResourceResponse&& response, ResponseCompletionHandler&& completionHandler)
 {
     ASSERT(isMainThread());
@@ -364,17 +387,7 @@
         return;
     }
 
-    if (m_parameters.clientCredentialPolicy == ClientCredentialPolicy::CannotAskClientForCredentials) {
-        completionHandler(AuthenticationChallengeDisposition::UseCredential, { });
-        return;
-    }
-    
-    if (m_task) {
-        if (auto* pendingDownload = m_task->pendingDownload())
-            NetworkProcess::singleton().authenticationManager().didReceiveAuthenticationChallenge(*pendingDownload, *m_challenge, WTFMove(completionHandler));
-        else
-            NetworkProcess::singleton().authenticationManager().didReceiveAuthenticationChallenge(m_parameters.webPageID, m_parameters.webFrameID, *m_challenge, WTFMove(completionHandler));
-    }
+    completeAuthenticationChallenge(WTFMove(completionHandler));
 #else
     m_waitingForContinueCanAuthenticateAgainstProtectionSpace = false;
 #endif

Modified: trunk/Source/WebKit2/NetworkProcess/NetworkLoad.h (206582 => 206583)


--- trunk/Source/WebKit2/NetworkProcess/NetworkLoad.h	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkLoad.h	2016-09-29 15:30:33 UTC (rev 206583)
@@ -123,6 +123,8 @@
     void didSendData(uint64_t totalBytesSent, uint64_t totalBytesExpectedToSend) override;
     void wasBlocked() override;
     void cannotShowURL() override;
+
+    void completeAuthenticationChallenge(ChallengeCompletionHandler&&);
 #endif
 
     NetworkLoadClient& m_client;
@@ -130,7 +132,9 @@
 #if USE(NETWORK_SESSION)
     RefPtr<NetworkDataTask> m_task;
     Optional<WebCore::AuthenticationChallenge> m_challenge;
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     ChallengeCompletionHandler m_challengeCompletionHandler;
+#endif
     ResponseCompletionHandler m_responseCompletionHandler;
     RedirectCompletionHandler m_redirectCompletionHandler;
 #else

Modified: trunk/Source/WebKit2/NetworkProcess/NetworkLoadClient.h (206582 => 206583)


--- trunk/Source/WebKit2/NetworkProcess/NetworkLoadClient.h	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkLoadClient.h	2016-09-29 15:30:33 UTC (rev 206583)
@@ -48,7 +48,9 @@
     virtual bool isSynchronous() const = 0;
 
     virtual void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent) = 0;
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     virtual void canAuthenticateAgainstProtectionSpaceAsync(const WebCore::ProtectionSpace&) = 0;
+#endif
     virtual void willSendRedirectedRequest(WebCore::ResourceRequest&&, WebCore::ResourceRequest&& redirectRequest, WebCore::ResourceResponse&& redirectResponse) = 0;
     enum class ShouldContinueDidReceiveResponse { No, Yes };
     virtual ShouldContinueDidReceiveResponse didReceiveResponse(WebCore::ResourceResponse&&) = 0;

Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (206582 => 206583)


--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp	2016-09-29 15:30:33 UTC (rev 206583)
@@ -501,10 +501,12 @@
 #endif
 
 #if USE(NETWORK_SESSION)
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
 void NetworkProcess::continueCanAuthenticateAgainstProtectionSpaceDownload(DownloadID downloadID, bool canAuthenticate)
 {
     downloadManager().continueCanAuthenticateAgainstProtectionSpace(downloadID, canAuthenticate);
 }
+#endif
 
 void NetworkProcess::continueWillSendRequest(DownloadID downloadID, WebCore::ResourceRequest&& request)
 {

Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.h (206582 => 206583)


--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.h	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.h	2016-09-29 15:30:33 UTC (rev 206583)
@@ -177,7 +177,9 @@
     void continueCanAuthenticateAgainstProtectionSpace(uint64_t resourceLoadIdentifier, bool canAuthenticate);
 #endif
 #if USE(NETWORK_SESSION)
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     void continueCanAuthenticateAgainstProtectionSpaceDownload(DownloadID, bool canAuthenticate);
+#endif
     void continueWillSendRequest(DownloadID, WebCore::ResourceRequest&&);
 #endif
     void continueDecidePendingDownloadDestination(DownloadID, String destination, const SandboxExtension::Handle& sandboxExtensionHandle, bool allowOverwrite);

Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.messages.in (206582 => 206583)


--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.messages.in	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.messages.in	2016-09-29 15:30:33 UTC (rev 206583)
@@ -49,7 +49,9 @@
     ContinueCanAuthenticateAgainstProtectionSpace(uint64_t loaderID, bool canAuthenticate)
 #endif
 #if USE(NETWORK_SESSION)
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     ContinueCanAuthenticateAgainstProtectionSpaceDownload(WebKit::DownloadID downloadID, bool canAuthenticate)
+#endif
     ContinueWillSendRequest(WebKit::DownloadID downloadID, WebCore::ResourceRequest request)
 #endif
     ContinueDecidePendingDownloadDestination(WebKit::DownloadID downloadID, String destination, WebKit::SandboxExtension::Handle sandboxExtensionHandle, bool allowOverwrite)

Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (206582 => 206583)


--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp	2016-09-29 15:30:33 UTC (rev 206583)
@@ -648,16 +648,12 @@
     m_fileReferences.clear();
 }
 
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
 void NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync(const ProtectionSpace& protectionSpace)
 {
-#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     NetworkProcess::singleton().canAuthenticateAgainstProtectionSpace(*this, protectionSpace);
-#else
-    UNUSED_PARAM(protectionSpace);
-#endif
 }
 
-#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
 void NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace(bool result)
 {
     if (m_networkLoad)

Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h (206582 => 206583)


--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h	2016-09-29 15:30:33 UTC (rev 206583)
@@ -86,7 +86,9 @@
 
     // NetworkLoadClient.
     void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent) override;
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     void canAuthenticateAgainstProtectionSpaceAsync(const WebCore::ProtectionSpace&) override;
+#endif
     bool isSynchronous() const override;
     void willSendRedirectedRequest(WebCore::ResourceRequest&&, WebCore::ResourceRequest&& redirectRequest, WebCore::ResourceResponse&&) override;
     ShouldContinueDidReceiveResponse didReceiveResponse(WebCore::ResourceResponse&&) override;

Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoad.h (206582 => 206583)


--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoad.h	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoad.h	2016-09-29 15:30:33 UTC (rev 206583)
@@ -54,7 +54,9 @@
 private:
     // NetworkLoadClient.
     void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent) override { }
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     void canAuthenticateAgainstProtectionSpaceAsync(const WebCore::ProtectionSpace&) override { }
+#endif
     bool isSynchronous() const override { return false; }
     void willSendRedirectedRequest(WebCore::ResourceRequest&&, WebCore::ResourceRequest&& redirectRequest, WebCore::ResourceResponse&& redirectResponse) override;
     ShouldContinueDidReceiveResponse didReceiveResponse(WebCore::ResourceResponse&&) override;

Modified: trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.h (206582 => 206583)


--- trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.h	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.h	2016-09-29 15:30:33 UTC (rev 206583)
@@ -58,8 +58,10 @@
 #if USE(NETWORK_SESSION)
     void didReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&);
     void didReceiveAuthenticationChallenge(PendingDownload&, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&);
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     void continueCanAuthenticateAgainstProtectionSpace(DownloadID, bool canAuthenticate);
 #endif
+#endif
     // Called for resources in the WebProcess (NetworkProcess disabled)
     void didReceiveAuthenticationChallenge(WebFrame*, const WebCore::AuthenticationChallenge&);
     // Called for resources in the NetworkProcess (NetworkProcess enabled)

Modified: trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp (206582 => 206583)


--- trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp	2016-09-29 15:30:33 UTC (rev 206583)
@@ -113,6 +113,7 @@
 }
 
 #if USE(NETWORK_SESSION)
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
 void DownloadProxy::canAuthenticateAgainstProtectionSpace(const ProtectionSpace& protectionSpace)
 {
     if (!m_processPool)
@@ -126,6 +127,7 @@
     
     networkProcessProxy->connection()->send(Messages::NetworkProcess::ContinueCanAuthenticateAgainstProtectionSpaceDownload(m_downloadID, result), 0);
 }
+#endif
 
 void DownloadProxy::willSendRequest(const ResourceRequest& proposedRequest, const ResourceResponse& redirectResponse)
 {

Modified: trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.h (206582 => 206583)


--- trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.h	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.h	2016-09-29 15:30:33 UTC (rev 206583)
@@ -87,7 +87,9 @@
     void didFail(const WebCore::ResourceError&, const IPC::DataReference& resumeData);
     void didCancel(const IPC::DataReference& resumeData);
 #if USE(NETWORK_SESSION)
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     void canAuthenticateAgainstProtectionSpace(const WebCore::ProtectionSpace&);
+#endif
     void willSendRequest(const WebCore::ResourceRequest& redirectRequest, const WebCore::ResourceResponse& redirectResponse);
 #else
     void decideDestinationWithSuggestedFilename(const String& filename, String& destination, bool& allowOverwrite, SandboxExtension::Handle& sandboxExtensionHandle);

Modified: trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.messages.in (206582 => 206583)


--- trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.messages.in	2016-09-29 15:28:54 UTC (rev 206582)
+++ trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.messages.in	2016-09-29 15:30:33 UTC (rev 206583)
@@ -24,9 +24,11 @@
     DidStart(WebCore::ResourceRequest request, AtomicString suggestedFilename)
     DidReceiveAuthenticationChallenge(WebCore::AuthenticationChallenge challenge, uint64_t challengeID)
 #if USE(NETWORK_SESSION)
-    WillSendRequest(WebCore::ResourceRequest redirectRequest, WebCore::ResourceResponse redirectResponse));
+    WillSendRequest(WebCore::ResourceRequest redirectRequest, WebCore::ResourceResponse redirectResponse))
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     CanAuthenticateAgainstProtectionSpace(WebCore::ProtectionSpace protectionSpace)
 #endif
+#endif
     DecideDestinationWithSuggestedFilenameAsync(WebKit::DownloadID downloadID, String suggestedFilename)
 
     DidReceiveResponse(WebCore::ResourceResponse response)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to