Title: [92691] trunk/Source/WebCore
Revision
92691
Author
jap...@chromium.org
Date
2011-08-09 11:05:30 -0700 (Tue, 09 Aug 2011)

Log Message

2011-08-09  Nate Chapin  <jap...@chromium.org>

        Remove receivedCancellation() from SubresourceLoaderClient.

        http://bugs.webkit.org/show_bug.cgi?id=65330

        Reviewed by Alexey Proskuryakov.

        No new tests, no change in functionality intended.

        * loader/DocumentThreadableLoader.cpp:
        * loader/DocumentThreadableLoader.h:
        * loader/SubresourceLoader.cpp:
        * loader/SubresourceLoader.h:
        * loader/SubresourceLoaderClient.h:
        * loader/ThreadableLoaderClient.h:
        * loader/WorkerThreadableLoader.cpp:
        * loader/WorkerThreadableLoader.h:
        * notifications/Notification.cpp:
        * notifications/Notification.h:  Remove receivedCancellation() since it's
           identical to didFail(), which is always called immediately after.
        * workers/WorkerScriptLoader.cpp:
        * workers/WorkerScriptLoader.h: Remove receivedCancellation() since it's
           identical to didFail(), which is always called immediately after.
        * xml/XMLHttpRequest.cpp:
        * xml/XMLHttpRequest.h: Remove receivedCancellation().  All it does is
           set m_response, which is cleared in didFail() before it can be used.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (92690 => 92691)


--- trunk/Source/WebCore/ChangeLog	2011-08-09 17:08:28 UTC (rev 92690)
+++ trunk/Source/WebCore/ChangeLog	2011-08-09 18:05:30 UTC (rev 92691)
@@ -1,3 +1,31 @@
+2011-08-09  Nate Chapin  <jap...@chromium.org>
+
+        Remove receivedCancellation() from SubresourceLoaderClient.
+
+        http://bugs.webkit.org/show_bug.cgi?id=65330
+
+        Reviewed by Alexey Proskuryakov.
+
+        No new tests, no change in functionality intended.
+
+        * loader/DocumentThreadableLoader.cpp:
+        * loader/DocumentThreadableLoader.h:
+        * loader/SubresourceLoader.cpp:
+        * loader/SubresourceLoader.h:
+        * loader/SubresourceLoaderClient.h:
+        * loader/ThreadableLoaderClient.h:
+        * loader/WorkerThreadableLoader.cpp:
+        * loader/WorkerThreadableLoader.h:
+        * notifications/Notification.cpp:
+        * notifications/Notification.h:  Remove receivedCancellation() since it's
+           identical to didFail(), which is always called immediately after.
+        * workers/WorkerScriptLoader.cpp:
+        * workers/WorkerScriptLoader.h: Remove receivedCancellation() since it's
+           identical to didFail(), which is always called immediately after.
+        * xml/XMLHttpRequest.cpp:
+        * xml/XMLHttpRequest.h: Remove receivedCancellation().  All it does is
+           set m_response, which is cleared in didFail() before it can be used.
+
 2011-08-09  Steve Block  <stevebl...@google.com>
 
         Java Bridge leaks local references

Modified: trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp (92690 => 92691)


--- trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp	2011-08-09 17:08:28 UTC (rev 92690)
+++ trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp	2011-08-09 18:05:30 UTC (rev 92691)
@@ -316,13 +316,6 @@
     }
 }
 
-void DocumentThreadableLoader::receivedCancellation(SubresourceLoader* loader, const AuthenticationChallenge& challenge)
-{
-    ASSERT(m_client);
-    ASSERT_UNUSED(loader, loader == m_loader);
-    m_client->didReceiveAuthenticationCancellation(loader->identifier(), challenge.failureResponse());
-}
-
 void DocumentThreadableLoader::preflightSuccess()
 {
     OwnPtr<ResourceRequest> actualRequest;

Modified: trunk/Source/WebCore/loader/DocumentThreadableLoader.h (92690 => 92691)


--- trunk/Source/WebCore/loader/DocumentThreadableLoader.h	2011-08-09 17:08:28 UTC (rev 92690)
+++ trunk/Source/WebCore/loader/DocumentThreadableLoader.h	2011-08-09 18:05:30 UTC (rev 92691)
@@ -84,7 +84,6 @@
 
         virtual bool getShouldUseCredentialStorage(SubresourceLoader*, bool& shouldUseCredentialStorage);
         virtual void didReceiveAuthenticationChallenge(SubresourceLoader*, const AuthenticationChallenge&);
-        virtual void receivedCancellation(SubresourceLoader*, const AuthenticationChallenge&);
 
         void didReceiveResponse(unsigned long identifier, const ResourceResponse&);
         void didFinishLoading(unsigned long identifier, double finishTime);

Modified: trunk/Source/WebCore/loader/SubresourceLoader.cpp (92690 => 92691)


--- trunk/Source/WebCore/loader/SubresourceLoader.cpp	2011-08-09 17:08:28 UTC (rev 92690)
+++ trunk/Source/WebCore/loader/SubresourceLoader.cpp	2011-08-09 18:05:30 UTC (rev 92691)
@@ -267,17 +267,4 @@
     ResourceLoader::didReceiveAuthenticationChallenge(challenge);
 }
 
-void SubresourceLoader::receivedCancellation(const AuthenticationChallenge& challenge)
-{
-    ASSERT(!reachedTerminalState());
-        
-    RefPtr<SubresourceLoader> protect(this);
-
-    if (m_client)
-        m_client->receivedCancellation(this, challenge);
-    
-    ResourceLoader::receivedCancellation(challenge);
 }
-    
-
-}

Modified: trunk/Source/WebCore/loader/SubresourceLoader.h (92690 => 92691)


--- trunk/Source/WebCore/loader/SubresourceLoader.h	2011-08-09 17:08:28 UTC (rev 92690)
+++ trunk/Source/WebCore/loader/SubresourceLoader.h	2011-08-09 18:05:30 UTC (rev 92691)
@@ -58,7 +58,6 @@
         virtual void didFail(const ResourceError&);
         virtual bool shouldUseCredentialStorage();
         virtual void didReceiveAuthenticationChallenge(const AuthenticationChallenge&);
-        virtual void receivedCancellation(const AuthenticationChallenge&);        
         virtual void willCancel(const ResourceError&);
         virtual void didCancel(const ResourceError&);
 

Modified: trunk/Source/WebCore/loader/SubresourceLoaderClient.h (92690 => 92691)


--- trunk/Source/WebCore/loader/SubresourceLoaderClient.h	2011-08-09 17:08:28 UTC (rev 92690)
+++ trunk/Source/WebCore/loader/SubresourceLoaderClient.h	2011-08-09 18:05:30 UTC (rev 92691)
@@ -53,8 +53,6 @@
     
     virtual bool getShouldUseCredentialStorage(SubresourceLoader*, bool& /*shouldUseCredentialStorage*/) { return false; }
     virtual void didReceiveAuthenticationChallenge(SubresourceLoader*, const AuthenticationChallenge&) { }
-    virtual void receivedCancellation(SubresourceLoader*, const AuthenticationChallenge&) { }
-
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/loader/ThreadableLoaderClient.h (92690 => 92691)


--- trunk/Source/WebCore/loader/ThreadableLoaderClient.h	2011-08-09 17:08:28 UTC (rev 92690)
+++ trunk/Source/WebCore/loader/ThreadableLoaderClient.h	2011-08-09 18:05:30 UTC (rev 92691)
@@ -49,8 +49,6 @@
         virtual void didFail(const ResourceError&) { }
         virtual void didFailRedirectCheck() { }
 
-        virtual void didReceiveAuthenticationCancellation(unsigned long /*identifier*/, const ResourceResponse&) { }
-
         virtual bool isDocumentThreadableLoaderClient() { return false; }
 
     protected:

Modified: trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp (92690 => 92691)


--- trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp	2011-08-09 17:08:28 UTC (rev 92690)
+++ trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp	2011-08-09 18:05:30 UTC (rev 92691)
@@ -249,18 +249,6 @@
     m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidFailRedirectCheck, m_workerClientWrapper), m_taskMode);
 }
 
-static void workerContextDidReceiveAuthenticationCancellation(ScriptExecutionContext* context, RefPtr<ThreadableLoaderClientWrapper> workerClientWrapper, unsigned long identifier, PassOwnPtr<CrossThreadResourceResponseData> responseData)
-{
-    ASSERT_UNUSED(context, context->isWorkerContext());
-    OwnPtr<ResourceResponse> response(ResourceResponse::adopt(responseData));
-    workerClientWrapper->didReceiveAuthenticationCancellation(identifier, *response);
-}
-
-void WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation(unsigned long identifier, const ResourceResponse& response)
-{
-    m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidReceiveAuthenticationCancellation, m_workerClientWrapper, identifier, response), m_taskMode);
-}
-
 } // namespace WebCore
 
 #endif // ENABLE(WORKERS)

Modified: trunk/Source/WebCore/loader/WorkerThreadableLoader.h (92690 => 92691)


--- trunk/Source/WebCore/loader/WorkerThreadableLoader.h	2011-08-09 17:08:28 UTC (rev 92690)
+++ trunk/Source/WebCore/loader/WorkerThreadableLoader.h	2011-08-09 18:05:30 UTC (rev 92691)
@@ -119,7 +119,6 @@
             virtual void didFinishLoading(unsigned long identifier, double finishTime);
             virtual void didFail(const ResourceError&);
             virtual void didFailRedirectCheck();
-            virtual void didReceiveAuthenticationCancellation(unsigned long identifier, const ResourceResponse&);
 
             // Only to be used on the main thread.
             RefPtr<ThreadableLoader> m_mainThreadLoader;

Modified: trunk/Source/WebCore/notifications/Notification.cpp (92690 => 92691)


--- trunk/Source/WebCore/notifications/Notification.cpp	2011-08-09 17:08:28 UTC (rev 92690)
+++ trunk/Source/WebCore/notifications/Notification.cpp	2011-08-09 18:05:30 UTC (rev 92691)
@@ -211,11 +211,6 @@
     finishLoading();
 }
 
-void Notification::didReceiveAuthenticationCancellation(unsigned long, const ResourceResponse&)
-{
-    finishLoading();
-}
-
 void Notification::finishLoading()
 {
     if (m_state == Loading) {

Modified: trunk/Source/WebCore/notifications/Notification.h (92690 => 92691)


--- trunk/Source/WebCore/notifications/Notification.h	2011-08-09 17:08:28 UTC (rev 92690)
+++ trunk/Source/WebCore/notifications/Notification.h	2011-08-09 18:05:30 UTC (rev 92691)
@@ -107,7 +107,6 @@
         virtual void didFinishLoading(unsigned long identifier, double finishTime);
         virtual void didFail(const ResourceError&);
         virtual void didFailRedirectCheck();
-        virtual void didReceiveAuthenticationCancellation(unsigned long, const ResourceResponse&);
 
     private:
         Notification(const KURL&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter>);

Modified: trunk/Source/WebCore/workers/WorkerScriptLoader.cpp (92690 => 92691)


--- trunk/Source/WebCore/workers/WorkerScriptLoader.cpp	2011-08-09 17:08:28 UTC (rev 92690)
+++ trunk/Source/WebCore/workers/WorkerScriptLoader.cpp	2011-08-09 18:05:30 UTC (rev 92691)
@@ -172,11 +172,6 @@
     notifyError();
 }
 
-void WorkerScriptLoader::didReceiveAuthenticationCancellation(unsigned long /*identifier*/, const ResourceResponse&)
-{
-    notifyError();
-}
-
 void WorkerScriptLoader::notifyError()
 {
     m_failed = true;

Modified: trunk/Source/WebCore/workers/WorkerScriptLoader.h (92690 => 92691)


--- trunk/Source/WebCore/workers/WorkerScriptLoader.h	2011-08-09 17:08:28 UTC (rev 92690)
+++ trunk/Source/WebCore/workers/WorkerScriptLoader.h	2011-08-09 18:05:30 UTC (rev 92691)
@@ -71,7 +71,6 @@
         virtual void didFinishLoading(unsigned long identifier, double);
         virtual void didFail(const ResourceError&);
         virtual void didFailRedirectCheck();
-        virtual void didReceiveAuthenticationCancellation(unsigned long /*identifier*/, const ResourceResponse&);
 
 #if PLATFORM(CHROMIUM)
         void setTargetType(ResourceRequest::TargetType targetType) { m_targetType = targetType; }

Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (92690 => 92691)


--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp	2011-08-09 17:08:28 UTC (rev 92690)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp	2011-08-09 18:05:30 UTC (rev 92691)
@@ -1048,11 +1048,6 @@
         m_responseEncoding = response.textEncodingName();
 }
 
-void XMLHttpRequest::didReceiveAuthenticationCancellation(unsigned long, const ResourceResponse& failureResponse)
-{
-    m_response = failureResponse;
-}
-
 void XMLHttpRequest::didReceiveData(const char* data, int len)
 {
     if (m_error)

Modified: trunk/Source/WebCore/xml/XMLHttpRequest.h (92690 => 92691)


--- trunk/Source/WebCore/xml/XMLHttpRequest.h	2011-08-09 17:08:28 UTC (rev 92690)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.h	2011-08-09 18:05:30 UTC (rev 92691)
@@ -155,7 +155,6 @@
     virtual void didFinishLoading(unsigned long identifier, double finishTime);
     virtual void didFail(const ResourceError&);
     virtual void didFailRedirectCheck();
-    virtual void didReceiveAuthenticationCancellation(unsigned long identifier, const ResourceResponse&);
 
     String responseMIMEType() const;
     bool responseIsXML() const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to