Remove code for handling NetworkProcess authentication challenges in WebProcess
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 27 Jan 2013 01:01:08 +0000 (01:01 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 27 Jan 2013 01:01:08 +0000 (01:01 +0000)
        https://bugs.webkit.org/show_bug.cgi?id=108003

        Reviewed by Sam Weinig.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140921 268f45cc-cd09-0410-ab3c-d52691b4dbfc

25 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/loader/ResourceLoader.cpp
Source/WebCore/platform/network/AuthenticationChallengeBase.cpp
Source/WebCore/platform/network/AuthenticationChallengeBase.h
Source/WebCore/platform/network/cf/AuthenticationCF.cpp
Source/WebCore/platform/network/cf/AuthenticationChallenge.h
Source/WebCore/platform/network/curl/AuthenticationChallenge.h
Source/WebCore/platform/network/mac/AuthenticationMac.mm
Source/WebCore/platform/network/qt/AuthenticationChallenge.h
Source/WebCore/platform/network/soup/AuthenticationChallenge.h
Source/WebCore/platform/network/win/AuthenticationChallenge.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebURLAuthenticationChallenge.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/DerivedSources.make
Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp
Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit2/NetworkProcess/NetworkResourceLoader.h
Source/WebKit2/NetworkProcess/NetworkResourceLoader.messages.in [deleted file]
Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp
Source/WebKit2/WebProcess/Network/WebResourceLoader.h
Source/WebKit2/WebProcess/Network/WebResourceLoader.messages.in

index d71f58b..c4d1944 100644 (file)
@@ -1,3 +1,37 @@
+2013-01-26  Alexey Proskuryakov  <ap@apple.com>
+
+        Remove code for handling NetworkProcess authentication challenges in WebProcess
+        https://bugs.webkit.org/show_bug.cgi?id=108003
+
+        Reviewed by Sam Weinig.
+
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
+        Once again, there can be no authentication without an in-process network request.
+
+        * WebCore.exp.in:
+        * platform/network/AuthenticationChallengeBase.cpp:
+        (WebCore::AuthenticationChallengeBase::AuthenticationChallengeBase):
+        * platform/network/AuthenticationChallengeBase.h:
+        (AuthenticationChallengeBase):
+        * platform/network/cf/AuthenticationCF.cpp:
+        (WebCore::AuthenticationChallenge::AuthenticationChallenge):
+        * platform/network/cf/AuthenticationChallenge.h:
+        (AuthenticationChallenge):
+        * platform/network/curl/AuthenticationChallenge.h:
+        (WebCore::AuthenticationChallenge::AuthenticationChallenge):
+        * platform/network/mac/AuthenticationMac.mm:
+        (WebCore::AuthenticationChallenge::AuthenticationChallenge):
+        * platform/network/qt/AuthenticationChallenge.h:
+        (WebCore::AuthenticationChallenge::AuthenticationChallenge):
+        * platform/network/soup/AuthenticationChallenge.h:
+        (WebCore::AuthenticationChallenge::AuthenticationChallenge):
+        * platform/network/win/AuthenticationChallenge.h:
+        (WebCore::AuthenticationChallenge::AuthenticationChallenge):
+        Removed everything related to AuthenticationChallengeBase::m_identifier.
+        The identifier is now tracked for IPC only, which is the right thing, because
+        nothing can guarantee identifier uniqueness across processes.
+
 2013-01-26  Laszlo Gombos  <l.gombos@samsung.com>
 
         Fix the test for CHANNEL_MESSAGING in idl files
index 00e39b0..1c99e60 100644 (file)
@@ -649,7 +649,7 @@ __ZN7WebCore23ApplicationCacheStorage23calculateUsageForOriginEPKNS_14SecurityOr
 __ZN7WebCore23ApplicationCacheStorage26storeUpdatedQuotaForOriginEPKNS_14SecurityOriginEx
 __ZN7WebCore23ApplicationCacheStorage5emptyEv
 __ZN7WebCore23AuthenticationChallenge23setAuthenticationClientEPNS_20AuthenticationClientE
-__ZN7WebCore23AuthenticationChallengeC1ERKNS_15ProtectionSpaceERKNS_10CredentialEjRKNS_16ResourceResponseERKNS_13ResourceErrorEy
+__ZN7WebCore23AuthenticationChallengeC1ERKNS_15ProtectionSpaceERKNS_10CredentialEjRKNS_16ResourceResponseERKNS_13ResourceErrorE
 __ZN7WebCore23createFragmentFromNodesEPNS_8DocumentERKN3WTF6VectorIPNS_4NodeELm0EEE
 __ZN7WebCore23dataForURLComponentTypeEP5NSURLl
 __ZN7WebCore23decodeHostNameWithRangeEP8NSString8_NSRange
index 131f18a..98ecef0 100644 (file)
@@ -485,7 +485,7 @@ bool ResourceLoader::shouldUseCredentialStorage()
 
 void ResourceLoader::didReceiveAuthenticationChallenge(const AuthenticationChallenge& challenge)
 {
-    ASSERT(!handle() || handle()->hasAuthenticationChallenge());
+    ASSERT(handle()->hasAuthenticationChallenge());
 
     // Protect this in this delegate method since the additional processing can do
     // anything including possibly derefing this; one example of this is Radar 3266216.
index a2f36a0..df80441 100644 (file)
@@ -32,7 +32,6 @@ namespace WebCore {
 AuthenticationChallengeBase::AuthenticationChallengeBase()
     : m_isNull(true)
     , m_previousFailureCount(0)
-    , m_identifier(0)
 {
 }
 
@@ -47,7 +46,6 @@ AuthenticationChallengeBase::AuthenticationChallengeBase(const ProtectionSpace&
     , m_previousFailureCount(previousFailureCount)
     , m_failureResponse(response)
     , m_error(error)
-    , m_identifier(0)
 {
 }
 
index 286415e..6afb844 100644 (file)
@@ -48,8 +48,6 @@ public:
     bool isNull() const;
     void nullify();
     
-    uint64_t identifier() const { return m_identifier; }
-
     static bool compare(const AuthenticationChallenge& a, const AuthenticationChallenge& b);
 
 protected:
@@ -62,7 +60,6 @@ protected:
     unsigned m_previousFailureCount;
     ResourceResponse m_failureResponse;
     ResourceError m_error;
-    uint64_t m_identifier;
 };
 
 inline bool operator==(const AuthenticationChallenge& a, const AuthenticationChallenge& b) { return AuthenticationChallengeBase::compare(a, b); }
index c1f7711..9caa890 100644 (file)
 
 namespace WebCore {
 
-static uint64_t generateUniqueIdentifier()
-{
-    static uint64_t uniqueIdentifier;
-    return ++uniqueIdentifier;
-}
-
 AuthenticationChallenge::AuthenticationChallenge(const ProtectionSpace& protectionSpace,
                                                  const Credential& proposedCredential,
                                                  unsigned previousFailureCount,
                                                  const ResourceResponse& response,
-                                                 const ResourceError& error,
-                                                 uint64_t identifier)
+                                                 const ResourceError& error)
     : AuthenticationChallengeBase(protectionSpace,
                                   proposedCredential,
                                   previousFailureCount,
                                   response,
                                   error)
 {
-    m_identifier = identifier;
 }
 
 AuthenticationChallenge::AuthenticationChallenge(CFURLAuthChallengeRef cfChallenge,
@@ -74,7 +66,6 @@ AuthenticationChallenge::AuthenticationChallenge(CFURLAuthChallengeRef cfChallen
     , m_authenticationClient(authenticationClient)
     , m_cfChallenge(cfChallenge)
 {
-    m_identifier = generateUniqueIdentifier();
 }
 
 AuthenticationClient* AuthenticationChallenge::authenticationClient() const
index e9aac29..7209ac7 100644 (file)
@@ -49,7 +49,7 @@ namespace WebCore {
 class AuthenticationChallenge : public AuthenticationChallengeBase {
 public:
     AuthenticationChallenge() {}
-    AuthenticationChallenge(const ProtectionSpace&, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse&, const ResourceError&, uint64_t identifier);
+    AuthenticationChallenge(const ProtectionSpace&, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse&, const ResourceError&);
 #if USE(CFNETWORK)
     AuthenticationChallenge(CFURLAuthChallengeRef, AuthenticationClient*);
 
index b1529e9..9237c92 100644 (file)
@@ -37,10 +37,9 @@ public:
     {
     }
 
-    AuthenticationChallenge(const ProtectionSpace& protectionSpace, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse& response, const ResourceError& error, uint64_t identifier)
+    AuthenticationChallenge(const ProtectionSpace& protectionSpace, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse& response, const ResourceError& error)
         : AuthenticationChallengeBase(protectionSpace, proposedCredential, previousFailureCount, response, error)
     {
-        m_identifier = identifier;
     }
 
     AuthenticationClient* authenticationClient() const { return m_authenticationClient.get(); }
index 2b245c6..8b2b1ad 100644 (file)
@@ -170,25 +170,17 @@ NSURLCredential *mac(const Credential& coreCredential)
 NSString * const NSURLAuthenticationMethodNTLM = @"NSURLAuthenticationMethodNTLM";
 #endif
 
-static uint64_t generateUniqueIdentifier()
-{
-    static uint64_t uniqueIdentifier;
-    return ++uniqueIdentifier;
-}
-
 AuthenticationChallenge::AuthenticationChallenge(const ProtectionSpace& protectionSpace,
                                                  const Credential& proposedCredential,
                                                  unsigned previousFailureCount,
                                                  const ResourceResponse& response,
-                                                 const ResourceError& error,
-                                                 uint64_t identifier)
+                                                 const ResourceError& error)
     : AuthenticationChallengeBase(protectionSpace,
                                   proposedCredential,
                                   previousFailureCount,
                                   response,
                                   error)
 {
-    m_identifier = identifier;
 }
 
 AuthenticationChallenge::AuthenticationChallenge(NSURLAuthenticationChallenge *challenge)
@@ -200,7 +192,6 @@ AuthenticationChallenge::AuthenticationChallenge(NSURLAuthenticationChallenge *c
     , m_sender([challenge sender])
     , m_nsChallenge(challenge)
 {
-    m_identifier = generateUniqueIdentifier();
 }
 
 void AuthenticationChallenge::setAuthenticationClient(AuthenticationClient* client)
index 7dd95b2..ebbc0cd 100644 (file)
@@ -37,10 +37,9 @@ public:
     {
     }
 
-    AuthenticationChallenge(const ProtectionSpace& protectionSpace, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse& response, const ResourceError& error, uint64_t identifier)
+    AuthenticationChallenge(const ProtectionSpace& protectionSpace, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse& response, const ResourceError& error)
         : AuthenticationChallengeBase(protectionSpace, proposedCredential, previousFailureCount, response, error)
     {
-        m_identifier = identifier;
     }
 
     AuthenticationClient* authenticationClient() const { return 0; } // FIXME: Implement!
index faa66d1..48cf591 100644 (file)
@@ -39,10 +39,9 @@ public:
     {
     }
 
-    AuthenticationChallenge(const ProtectionSpace& protectionSpace, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse& response, const ResourceError& error, uint64_t identifier)
+    AuthenticationChallenge(const ProtectionSpace& protectionSpace, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse& response, const ResourceError& error)
         : AuthenticationChallengeBase(protectionSpace, proposedCredential, previousFailureCount, response, error)
     {
-        m_identifier = identifier;
     }
 
     AuthenticationChallenge(SoupSession*, SoupMessage*, SoupAuth*, bool retrying, AuthenticationClient*);
index 0014ab8..7463539 100644 (file)
@@ -35,10 +35,9 @@ public:
     {
     }
 
-    AuthenticationChallenge(const ProtectionSpace& protectionSpace, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse& response, const ResourceError& error, uint64_t identifier)
+    AuthenticationChallenge(const ProtectionSpace& protectionSpace, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse& response, const ResourceError& error)
         : AuthenticationChallengeBase(protectionSpace, proposedCredential, previousFailureCount, response, error)
     {
-        m_identifier = identifier;
     }
 };
 
index 9e22990..0493e9c 100644 (file)
@@ -1,3 +1,14 @@
+2013-01-26  Alexey Proskuryakov  <ap@apple.com>
+
+        Remove code for handling NetworkProcess authentication challenges in WebProcess
+        https://bugs.webkit.org/show_bug.cgi?id=108003
+
+        Reviewed by Sam Weinig.
+
+        * WebURLAuthenticationChallenge.cpp:
+        (WebURLAuthenticationChallenge::initWithProtectionSpace):
+        Adapted for new AuthenticationChallenge constructor signature.
+
 2013-01-24  Mark Hahnenberg  <mhahnenberg@apple.com>
 
         Objective-C API: Rename JSValue.h/APIJSValue.h to JSCJSValue.h/JSValue.h
index eaeeca8..e12d0fd 100644 (file)
@@ -148,7 +148,7 @@ HRESULT STDMETHODCALLTYPE WebURLAuthenticationChallenge::initWithProtectionSpace
     // construct the AuthenticationChallenge with that as obtained from the webSender
 #if USE(CFNETWORK)
     m_authenticationChallenge = AuthenticationChallenge(webSpace->protectionSpace(), webCredential->credential(),
-                                    previousFailureCount, webResponse->resourceResponse(), webError->resourceError(), 0);
+                                    previousFailureCount, webResponse->resourceResponse(), webError->resourceError());
 #endif
     return S_OK;
 }
index 58cce7c..4370b41 100644 (file)
@@ -1,3 +1,36 @@
+2013-01-26  Alexey Proskuryakov  <ap@apple.com>
+
+        Remove code for handling NetworkProcess authentication challenges in WebProcess
+        https://bugs.webkit.org/show_bug.cgi?id=108003
+
+        Reviewed by Sam Weinig.
+
+        * DerivedSources.make:
+        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+        (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
+        * WebKit2.xcodeproj/project.pbxproj:
+        * NetworkProcess/NetworkResourceLoader.messages.in: Removed. We no longer have
+        an messages to NetworkResourceLoader.
+
+        * Shared/WebCoreArgumentCoders.cpp:
+        (CoreIPC::::encode):
+        (CoreIPC::::decode):
+        There is no longer an identifier inside AuthenticationChallenge.
+
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
+        (WebKit::NetworkResourceLoader::didCancelAuthenticationChallenge):
+        * NetworkProcess/NetworkResourceLoader.h:
+        Removed code for receiving authentication responses from WebProcess. Removed
+        m_currentAuthenticationChallenge - AuthenticationMAnager now keeps track of that.
+
+        * WebProcess/Network/WebResourceLoader.cpp:
+        * WebProcess/Network/WebResourceLoader.h:
+        * WebProcess/Network/WebResourceLoader.messages.in:
+        Removed code for handling authentication challenges. They are now sent directly to
+        UI Process. The only thing WebProcess still does is decide whether is can authenticate
+        against a particular authentication space.
+
 2013-01-26  Sam Weinig  <sam@webkit.org>
 
         Fix the development build.
index b212c51..3cb810e 100644 (file)
@@ -80,7 +80,6 @@ MESSAGE_RECEIVERS = \
     WebCookieManagerProxy \
     WebConnection \
     NetworkConnectionToWebProcess \
-    NetworkResourceLoader \
     RemoteLayerTreeHost \
     SecItemShim \
     SecItemShimProxy \
index e594d1e..b692f4b 100644 (file)
@@ -66,12 +66,6 @@ void NetworkConnectionToWebProcess::didReceiveMessage(CoreIPC::Connection* conne
         return;
     }
     
-    if (messageID.is<CoreIPC::MessageClassNetworkResourceLoader>()) {
-        NetworkResourceLoader* loader = m_networkResourceLoaders.get(decoder.destinationID()).get();
-        if (loader)
-            loader->didReceiveNetworkResourceLoaderMessage(connection, messageID, decoder);
-        return;
-    }
     ASSERT_NOT_REACHED();
 }
 
index 3bebbf1..2cbd989 100644 (file)
@@ -228,64 +228,12 @@ bool NetworkResourceLoader::shouldUseCredentialStorage(ResourceHandle*)
 
 void NetworkResourceLoader::didReceiveAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge& challenge)
 {
-    ASSERT(!m_currentAuthenticationChallenge);
-    m_currentAuthenticationChallenge = adoptPtr(new AuthenticationChallenge(challenge));
-
-    NetworkProcess::shared().authenticationManager().didReceiveAuthenticationChallenge(webPageID(), webFrameID(), *m_currentAuthenticationChallenge);
+    NetworkProcess::shared().authenticationManager().didReceiveAuthenticationChallenge(webPageID(), webFrameID(), challenge);
 }
 
 void NetworkResourceLoader::didCancelAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge& challenge)
 {
-    ASSERT(m_currentAuthenticationChallenge);
-    ASSERT(m_currentAuthenticationChallenge->identifier() == challenge.identifier());
-
-    send(Messages::WebResourceLoader::DidCancelAuthenticationChallenge(*m_currentAuthenticationChallenge));
-
-    m_currentAuthenticationChallenge.clear();
-}
-
-void NetworkResourceLoader::receivedCancellation(ResourceHandle*, const AuthenticationChallenge& challenge)
-{
-    receivedAuthenticationCancellation(challenge);
-}
-
-void NetworkResourceLoader::receivedAuthenticationCredential(const AuthenticationChallenge& challenge, const Credential& credential)
-{
-    ASSERT(m_currentAuthenticationChallenge);
-    ASSERT(m_currentAuthenticationChallenge->authenticationClient());
-
-    if (m_currentAuthenticationChallenge->identifier() != challenge.identifier())
-        return;
-    
-    m_currentAuthenticationChallenge->authenticationClient()->receivedCredential(*m_currentAuthenticationChallenge, credential);
-    m_currentAuthenticationChallenge.clear();
-}
-
-void NetworkResourceLoader::receivedRequestToContinueWithoutAuthenticationCredential(const AuthenticationChallenge& challenge)
-{
-    ASSERT(m_currentAuthenticationChallenge);
-    ASSERT(m_currentAuthenticationChallenge->authenticationClient());
-
-    if (m_currentAuthenticationChallenge->identifier() != challenge.identifier())
-        return;
-
-    m_currentAuthenticationChallenge->authenticationClient()->receivedRequestToContinueWithoutCredential(*m_currentAuthenticationChallenge);
-    m_currentAuthenticationChallenge.clear();
-}
-
-void NetworkResourceLoader::receivedAuthenticationCancellation(const AuthenticationChallenge& challenge)
-{
-    ASSERT(m_currentAuthenticationChallenge);
-    ASSERT(m_currentAuthenticationChallenge->authenticationClient());
-
-    if (m_currentAuthenticationChallenge->identifier() != challenge.identifier())
-        return;
-
-    m_handle->cancel();
-    m_currentAuthenticationChallenge.clear();
-
-    send(Messages::WebResourceLoader::CancelResourceLoader());
-    scheduleStopOnMainThread();
+    // FIXME (NetworkProcess): Tell AuthenticationManager.
 }
 
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
index c34a7d0..dfacb6c 100644 (file)
@@ -31,7 +31,6 @@
 #include "MessageSender.h"
 #include "NetworkConnectionToWebProcess.h"
 #include "SchedulableLoader.h"
-#include <WebCore/AuthenticationChallenge.h>
 #include <WebCore/ResourceHandleClient.h>
 #include <WebCore/ResourceLoaderOptions.h>
 #include <WebCore/ResourceRequest.h>
@@ -58,8 +57,6 @@ public:
     CoreIPC::Connection* connection() const;
     uint64_t destinationID() const;
     
-    void didReceiveNetworkResourceLoaderMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&);
-
     virtual void start();
         
     // ResourceHandleClient methods
@@ -75,7 +72,6 @@ public:
     virtual bool shouldUseCredentialStorage(WebCore::ResourceHandle*) OVERRIDE;
     virtual void didReceiveAuthenticationChallenge(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&) OVERRIDE;
     virtual void didCancelAuthenticationChallenge(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&) OVERRIDE;
-    virtual void receivedCancellation(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&) OVERRIDE;
 
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     virtual bool canAuthenticateAgainstProtectionSpace(WebCore::ResourceHandle*, const WebCore::ProtectionSpace&) OVERRIDE;
@@ -102,10 +98,6 @@ public:
 private:
     NetworkResourceLoader(const NetworkResourceLoadParameters&, NetworkConnectionToWebProcess*);
 
-    void receivedAuthenticationCredential(const WebCore::AuthenticationChallenge&, const WebCore::Credential&);
-    void receivedRequestToContinueWithoutAuthenticationCredential(const WebCore::AuthenticationChallenge&);
-    void receivedAuthenticationCancellation(const WebCore::AuthenticationChallenge&);
-    
     void scheduleStopOnMainThread();
     static void performStops(void*);
 
@@ -113,8 +105,6 @@ private:
 
     RefPtr<RemoteNetworkingContext> m_networkingContext;
     RefPtr<WebCore::ResourceHandle> m_handle;    
-    
-    OwnPtr<WebCore::AuthenticationChallenge> m_currentAuthenticationChallenge;
 };
 
 } // namespace WebKit
diff --git a/Source/WebKit2/NetworkProcess/NetworkResourceLoader.messages.in b/Source/WebKit2/NetworkProcess/NetworkResourceLoader.messages.in
deleted file mode 100644 (file)
index b9f8d4c..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright (C) 2012 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.
-
-#if ENABLE(NETWORK_PROCESS)
-
-messages -> NetworkResourceLoader LegacyReceiver {
-    ReceivedAuthenticationCredential(WebCore::AuthenticationChallenge challenge, WebCore::Credential credential)
-    ReceivedRequestToContinueWithoutAuthenticationCredential(WebCore::AuthenticationChallenge challenge)
-    ReceivedAuthenticationCancellation(WebCore::AuthenticationChallenge challenge)
-}
-
-#endif // ENABLE(NETWORK_PROCESS)
index 058a74f..039b8d6 100644 (file)
@@ -196,7 +196,7 @@ bool ArgumentCoder<HTTPHeaderMap>::decode(ArgumentDecoder* decoder, HTTPHeaderMa
 
 void ArgumentCoder<AuthenticationChallenge>::encode(ArgumentEncoder& encoder, const AuthenticationChallenge& challenge)
 {
-    encoder << challenge.protectionSpace() << challenge.proposedCredential() << challenge.previousFailureCount() << challenge.failureResponse() << challenge.error() << challenge.identifier();
+    encoder << challenge.protectionSpace() << challenge.proposedCredential() << challenge.previousFailureCount() << challenge.failureResponse() << challenge.error();
 }
 
 bool ArgumentCoder<AuthenticationChallenge>::decode(ArgumentDecoder* decoder, AuthenticationChallenge& challenge)
@@ -221,11 +221,7 @@ bool ArgumentCoder<AuthenticationChallenge>::decode(ArgumentDecoder* decoder, Au
     if (!decoder->decode(error))
         return false;
     
-    uint64_t identifier;
-    if (!decoder->decode(identifier))
-        return false;
-    
-    challenge = AuthenticationChallenge(protectionSpace, proposedCredential, previousFailureCount, failureResponse, error, identifier);
+    challenge = AuthenticationChallenge(protectionSpace, proposedCredential, previousFailureCount, failureResponse, error);
     return true;
 }
 
index 98c8e14..5c4b4f9 100644 (file)
                5163199416289A6000E22F00 /* NetworkProcessMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51ACC9341628064800342550 /* NetworkProcessMessageReceiver.cpp */; };
                5163199516289A6300E22F00 /* NetworkProcessMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 51ACC9351628064800342550 /* NetworkProcessMessages.h */; };
                516A4A5D120A2CCD00C05B7F /* WebError.h in Headers */ = {isa = PBXBuildFile; fileRef = 516A4A5B120A2CCD00C05B7F /* WebError.h */; };
-               5175944A1657080400DD771D /* NetworkResourceLoaderMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517594481657080400DD771D /* NetworkResourceLoaderMessageReceiver.cpp */; };
-               5175944B1657080400DD771D /* NetworkResourceLoaderMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 517594491657080400DD771D /* NetworkResourceLoaderMessages.h */; };
                51795567162876CB00FA43B6 /* NetworkProcessMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51A8A6151627F3F9000D90E9 /* NetworkProcessMac.mm */; };
                51795568162876CF00FA43B6 /* NetworkProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510CC7DF16138E2900D03ED3 /* NetworkProcess.cpp */; };
                5179556A162876F300FA43B6 /* NetworkProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 510CC7E016138E2900D03ED3 /* NetworkProcess.h */; };
                513A164B1630A9BF005D7D22 /* NetworkConnectionToWebProcess.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = NetworkConnectionToWebProcess.messages.in; path = NetworkProcess/NetworkConnectionToWebProcess.messages.in; sourceTree = "<group>"; };
                5153569A1291B1D2000749DC /* WebPageContextMenuClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPageContextMenuClient.cpp; sourceTree = "<group>"; };
                5153569B1291B1D2000749DC /* WebPageContextMenuClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPageContextMenuClient.h; sourceTree = "<group>"; };
-               515705521657018C00101A90 /* NetworkResourceLoader.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; name = NetworkResourceLoader.messages.in; path = NetworkProcess/NetworkResourceLoader.messages.in; sourceTree = "<group>"; };
                51578B821209ECEF00A37C4A /* WebData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebData.h; sourceTree = "<group>"; };
                5160BFE013381DF900918999 /* Logging.mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Logging.mac.mm; sourceTree = "<group>"; };
                516319911628980A00E22F00 /* NetworkProcessProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = NetworkProcessProxyMac.mm; path = mac/NetworkProcessProxyMac.mm; sourceTree = "<group>"; };
                516A4A5B120A2CCD00C05B7F /* WebError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebError.h; sourceTree = "<group>"; };
-               517594481657080400DD771D /* NetworkResourceLoaderMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkResourceLoaderMessageReceiver.cpp; sourceTree = "<group>"; };
-               517594491657080400DD771D /* NetworkResourceLoaderMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkResourceLoaderMessages.h; sourceTree = "<group>"; };
                517A33B3130B308C00F80CB5 /* WKApplicationCacheManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKApplicationCacheManager.cpp; sourceTree = "<group>"; };
                517A33B4130B308C00F80CB5 /* WKApplicationCacheManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKApplicationCacheManager.h; sourceTree = "<group>"; };
                517CF0E1163A486C00C2950E /* NetworkProcessConnectionMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkProcessConnectionMessageReceiver.cpp; sourceTree = "<group>"; };
                                51A8A6171627F5BB000D90E9 /* NetworkProcess.messages.in */,
                                51FD18B31651FBAD00DBE1CE /* NetworkResourceLoader.cpp */,
                                51FD18B41651FBAD00DBE1CE /* NetworkResourceLoader.h */,
-                               515705521657018C00101A90 /* NetworkResourceLoader.messages.in */,
                                51829DA31637C70C000953D6 /* NetworkResourceLoadScheduler.cpp */,
                                51829DA41637C70C000953D6 /* NetworkResourceLoadScheduler.h */,
                                519B4FF216A9EA970066874D /* SchedulableLoader.cpp */,
                                51ACC9351628064800342550 /* NetworkProcessMessages.h */,
                                513A163A163088F6005D7D22 /* NetworkProcessProxyMessageReceiver.cpp */,
                                513A163B163088F6005D7D22 /* NetworkProcessProxyMessages.h */,
-                               517594481657080400DD771D /* NetworkResourceLoaderMessageReceiver.cpp */,
-                               517594491657080400DD771D /* NetworkResourceLoaderMessages.h */,
                                1A2D8437127F65D5001EB962 /* NPObjectMessageReceiverMessageReceiver.cpp */,
                                1A2D8438127F65D5001EB962 /* NPObjectMessageReceiverMessages.h */,
                                1A8EF96C1252AF6B00F7067F /* PluginControllerProxyMessageReceiver.cpp */,
                                513A163D163088F6005D7D22 /* NetworkProcessProxyMessages.h in Headers */,
                                BCF4DE23168E4BD500C94AFC /* NetworkProcessSupplement.h in Headers */,
                                51FD18B61651FBAD00DBE1CE /* NetworkResourceLoader.h in Headers */,
-                               5175944B1657080400DD771D /* NetworkResourceLoaderMessages.h in Headers */,
                                51CBBA10165219B6005BE8FD /* NetworkResourceLoadParameters.h in Headers */,
                                51829DA61637C70C000953D6 /* NetworkResourceLoadScheduler.h in Headers */,
                                31A2EC5614899C0900810D71 /* NotificationPermissionRequest.h in Headers */,
                                516319921628980A00E22F00 /* NetworkProcessProxyMac.mm in Sources */,
                                513A163C163088F6005D7D22 /* NetworkProcessProxyMessageReceiver.cpp in Sources */,
                                51FD18B51651FBAD00DBE1CE /* NetworkResourceLoader.cpp in Sources */,
-                               5175944A1657080400DD771D /* NetworkResourceLoaderMessageReceiver.cpp in Sources */,
                                51CBBA0F165219B6005BE8FD /* NetworkResourceLoadParameters.cpp in Sources */,
                                51829DA51637C70C000953D6 /* NetworkResourceLoadScheduler.cpp in Sources */,
                                512C069016390E6900ABB911 /* NetworkResourceLoadSchedulerMac.mm in Sources */,
index 668b463..76d7f62 100644 (file)
 
 #include "DataReference.h"
 #include "Logging.h"
-#include "NetworkConnectionToWebProcessMessages.h"
 #include "NetworkProcessConnection.h"
-#include "NetworkResourceLoaderMessages.h"
 #include "PlatformCertificateInfo.h"
 #include "WebCoreArgumentCoders.h"
 #include "WebErrors.h"
 #include "WebProcess.h"
-#include <WebCore/AuthenticationChallenge.h>
+#include <WebCore/ResourceError.h>
 #include <WebCore/ResourceLoader.h>
 
 using namespace WebCore;
@@ -130,52 +128,6 @@ void WebResourceLoader::canAuthenticateAgainstProtectionSpace(const ProtectionSp
     result = m_coreLoader->canAuthenticateAgainstProtectionSpace(protectionSpace);
 }
 
-void WebResourceLoader::didReceiveAuthenticationChallenge(const AuthenticationChallenge& challenge)
-{
-    LOG(Network, "(WebProcess) WebResourceLoader::didReceiveAuthenticationChallenge for '%s'", m_coreLoader->url().string().utf8().data());
-
-    m_currentAuthenticationChallenge = adoptPtr(new AuthenticationChallenge(challenge));
-    m_currentAuthenticationChallenge->setAuthenticationClient(this);
-
-    m_coreLoader->didReceiveAuthenticationChallenge(*m_currentAuthenticationChallenge);
-}
-
-void WebResourceLoader::didCancelAuthenticationChallenge(const AuthenticationChallenge& challenge)
-{
-    if (m_currentAuthenticationChallenge->identifier() != challenge.identifier())
-        return;
-
-    LOG(Network, "(WebProcess) WebResourceLoader::didCancelAuthenticationChallenge for '%s'", m_coreLoader->url().string().utf8().data());
-
-    m_coreLoader->didCancelAuthenticationChallenge(*m_currentAuthenticationChallenge);
-    m_currentAuthenticationChallenge.clear();
-}
-
-// WebCore::AuthenticationClient
-void WebResourceLoader::receivedCredential(const AuthenticationChallenge& challenge, const Credential& credential)
-{
-    ASSERT(m_currentAuthenticationChallenge && challenge == *m_currentAuthenticationChallenge);
-    send(Messages::NetworkResourceLoader::ReceivedAuthenticationCredential(challenge, credential));
-
-    m_currentAuthenticationChallenge.clear();
-}
-
-void WebResourceLoader::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge& challenge)
-{
-    ASSERT(m_currentAuthenticationChallenge && challenge == *m_currentAuthenticationChallenge);
-    send(Messages::NetworkResourceLoader::ReceivedRequestToContinueWithoutAuthenticationCredential(challenge));
-
-    m_currentAuthenticationChallenge.clear();
-}
-
-void WebResourceLoader::receivedCancellation(const AuthenticationChallenge& challenge)
-{
-    ASSERT(m_currentAuthenticationChallenge && challenge == *m_currentAuthenticationChallenge);
-    send(Messages::NetworkResourceLoader::ReceivedAuthenticationCancellation(challenge));
-
-    m_currentAuthenticationChallenge.clear();
-}
-
 void WebResourceLoader::networkProcessCrashed()
 {
     ASSERT(m_coreLoader);
index 78a29fc..eeef437 100644 (file)
@@ -31,7 +31,6 @@
 #include "Connection.h"
 #include "MessageSender.h"
 #include "ShareableResource.h"
-#include <WebCore/AuthenticationClient.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
@@ -41,7 +40,6 @@ class DataReference;
 }
 
 namespace WebCore {
-class AuthenticationChallenge;
 class ProtectionSpace;
 class ResourceBuffer;
 class ResourceError;
@@ -55,7 +53,7 @@ namespace WebKit {
 class PlatformCertificateInfo;
 typedef uint64_t ResourceLoadIdentifier;
 
-class WebResourceLoader : public RefCounted<WebResourceLoader>, public CoreIPC::MessageSender<WebResourceLoader>, public WebCore::AuthenticationClient {
+class WebResourceLoader : public RefCounted<WebResourceLoader>, public CoreIPC::MessageSender<WebResourceLoader> {
 public:
     static PassRefPtr<WebResourceLoader> create(PassRefPtr<WebCore::ResourceLoader>);
 
@@ -68,13 +66,6 @@ public:
     void didReceiveWebResourceLoaderMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&);
     void didReceiveSyncWebResourceLoaderMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&);
 
-    using RefCounted<WebResourceLoader>::ref;
-    using RefCounted<WebResourceLoader>::deref;
-
-    virtual void receivedCredential(const WebCore::AuthenticationChallenge&, const WebCore::Credential&);
-    virtual void receivedRequestToContinueWithoutCredential(const WebCore::AuthenticationChallenge&);
-    virtual void receivedCancellation(const WebCore::AuthenticationChallenge&);
-
     void networkProcessCrashed();
 
 private:
@@ -90,14 +81,8 @@ private:
     void didReceiveResource(const ShareableResource::Handle&, double finishTime);
 
     void canAuthenticateAgainstProtectionSpace(const WebCore::ProtectionSpace&, bool& result);
-    void didReceiveAuthenticationChallenge(const WebCore::AuthenticationChallenge&);
-    void didCancelAuthenticationChallenge(const WebCore::AuthenticationChallenge&);
-
-    virtual void refAuthenticationClient() { ref(); }
-    virtual void derefAuthenticationClient() { deref(); }
 
     RefPtr<WebCore::ResourceLoader> m_coreLoader;
-    OwnPtr<WebCore::AuthenticationChallenge> m_currentAuthenticationChallenge;
 };
 
 } // namespace WebKit
index 82dc32e..ead57a8 100644 (file)
@@ -32,8 +32,6 @@ messages -> WebResourceLoader LegacyReceiver {
     DidFailResourceLoad(WebCore::ResourceError error)
     
     CanAuthenticateAgainstProtectionSpace(WebCore::ProtectionSpace protectionSpace) -> (bool response)
-    DidReceiveAuthenticationChallenge(WebCore::AuthenticationChallenge challenge)
-    DidCancelAuthenticationChallenge(WebCore::AuthenticationChallenge challenge)
 
     // DidReceiveResource is for when we have the entire resource data available at once, such as when the resource is cached in memory
     DidReceiveResource(WebKit::ShareableResource::Handle resource, double finishTime)