Implement NetworkResourceLoader::receivedCancellation
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Jan 2014 09:11:00 +0000 (09:11 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Jan 2014 09:11:00 +0000 (09:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=126129

Reviewed Alexey Proskuryakov.

Implement ResourceHandleClient::receivedCancellation() in the
network process to cancel the load when cancellation is received
from the authentication manager like the web process does.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::receivedCancellation): Cancel the load.
* NetworkProcess/NetworkResourceLoader.h:

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

Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit2/NetworkProcess/NetworkResourceLoader.h

index 6255be6..c403020 100644 (file)
@@ -1,3 +1,18 @@
+2014-01-10  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        Implement NetworkResourceLoader::receivedCancellation
+        https://bugs.webkit.org/show_bug.cgi?id=126129
+
+        Reviewed Alexey Proskuryakov.
+
+        Implement ResourceHandleClient::receivedCancellation() in the
+        network process to cancel the load when cancellation is received
+        from the authentication manager like the web process does.
+
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::NetworkResourceLoader::receivedCancellation): Cancel the load.
+        * NetworkProcess/NetworkResourceLoader.h:
+
 2014-01-09  Jinwoo Song  <jinwoo7.song@samsung.com>
 
         [EFL][WK2] Add APIs for setting and getting the default text encoding name
index ba89c8e..650fc69 100644 (file)
@@ -336,6 +336,14 @@ void NetworkResourceLoader::didCancelAuthenticationChallenge(ResourceHandle* han
     notImplemented();
 }
 
+void NetworkResourceLoader::receivedCancellation(ResourceHandle* handle, const AuthenticationChallenge& challenge)
+{
+    ASSERT_UNUSED(handle, handle == m_handle);
+
+    m_handle->cancel();
+    didFail(m_handle.get(), cancelledError(m_request));
+}
+
 IPC::Connection* NetworkResourceLoader::messageSenderConnection()
 {
     return connectionToWebProcess()->connection();
index f2f63d5..cb32f0a 100644 (file)
@@ -92,6 +92,7 @@ public:
     virtual void shouldUseCredentialStorageAsync(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;
     virtual bool usesAsyncCallbacks() OVERRIDE { return true; }
 
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)