Title: [206479] trunk/Source/WebKit2
Revision
206479
Author
[email protected]
Date
2016-09-27 18:01:29 -0700 (Tue, 27 Sep 2016)

Log Message

NetworkLoad and PingLoad should use private inheritance
https://bugs.webkit.org/show_bug.cgi?id=162649

Reviewed by Alex Christensen.

Make NetworkLoad privately inherit from NetworkDataTaskClient and ResourceHandleClient,
and make the client callbacks from these interfaces private as this class implements
these interfaces.

Similarly, make PingLoad privately inherit from ResourceHandleClient.

* NetworkProcess/NetworkLoad.h:
* NetworkProcess/PingLoad.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (206478 => 206479)


--- trunk/Source/WebKit2/ChangeLog	2016-09-28 00:37:01 UTC (rev 206478)
+++ trunk/Source/WebKit2/ChangeLog	2016-09-28 01:01:29 UTC (rev 206479)
@@ -1,3 +1,19 @@
+2016-09-27  Daniel Bates  <[email protected]>
+
+        NetworkLoad and PingLoad should use private inheritance
+        https://bugs.webkit.org/show_bug.cgi?id=162649
+
+        Reviewed by Alex Christensen.
+
+        Make NetworkLoad privately inherit from NetworkDataTaskClient and ResourceHandleClient,
+        and make the client callbacks from these interfaces private as this class implements
+        these interfaces.
+
+        Similarly, make PingLoad privately inherit from ResourceHandleClient.
+
+        * NetworkProcess/NetworkLoad.h:
+        * NetworkProcess/PingLoad.h:
+
 2016-09-20  Anders Carlsson  <[email protected]>
 
         PlatformEvent::m_modifiers should be an OptionSet

Modified: trunk/Source/WebKit2/NetworkProcess/NetworkLoad.h (206478 => 206479)


--- trunk/Source/WebKit2/NetworkProcess/NetworkLoad.h	2016-09-28 00:37:01 UTC (rev 206478)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkLoad.h	2016-09-28 01:01:29 UTC (rev 206479)
@@ -40,9 +40,9 @@
 
 namespace WebKit {
 
-class NetworkLoad : public WebCore::ResourceHandleClient
+class NetworkLoad : private WebCore::ResourceHandleClient
 #if USE(NETWORK_SESSION)
-    , public NetworkDataTaskClient
+    , private NetworkDataTaskClient
 #endif
 {
     WTF_MAKE_FAST_ALLOCATED;
@@ -69,33 +69,7 @@
     void setSuggestedFilename(const String&);
     void setPendingDownload(PendingDownload&);
     DownloadID pendingDownloadID() { return m_task->pendingDownloadID(); }
-    
-    // NetworkDataTaskClient
-    void willPerformHTTPRedirection(WebCore::ResourceResponse&&, WebCore::ResourceRequest&&, RedirectCompletionHandler&&) final;
-    void didReceiveChallenge(const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&) final;
-    void didReceiveResponseNetworkSession(WebCore::ResourceResponse&&, ResponseCompletionHandler&&) final;
-    void didReceiveData(Ref<WebCore::SharedBuffer>&&) final;
-    void didCompleteWithError(const WebCore::ResourceError&) final;
-    void didBecomeDownload() final;
-    void didSendData(uint64_t totalBytesSent, uint64_t totalBytesExpectedToSend) override;
-    void wasBlocked() override;
-    void cannotShowURL() override;
 #endif
-    // ResourceHandleClient
-    void willSendRequestAsync(WebCore::ResourceHandle*, WebCore::ResourceRequest&&, WebCore::ResourceResponse&& redirectResponse) override;
-    void didSendData(WebCore::ResourceHandle*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) override;
-    void didReceiveResponseAsync(WebCore::ResourceHandle*, WebCore::ResourceResponse&&) override;
-    void didReceiveData(WebCore::ResourceHandle*, const char*, unsigned, int encodedDataLength) override;
-    void didReceiveBuffer(WebCore::ResourceHandle*, Ref<WebCore::SharedBuffer>&&, int reportedEncodedDataLength) override;
-    void didFinishLoading(WebCore::ResourceHandle*, double finishTime) override;
-    void didFail(WebCore::ResourceHandle*, const WebCore::ResourceError&) override;
-    void wasBlocked(WebCore::ResourceHandle*) override;
-    void cannotShowURL(WebCore::ResourceHandle*) override;
-    bool shouldUseCredentialStorage(WebCore::ResourceHandle*) override;
-    void didReceiveAuthenticationChallenge(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&) override;
-    void receivedCancellation(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&) override;
-    bool usesAsyncCallbacks() override { return true; }
-    bool loadingSynchronousXHR() override { return m_client.isSynchronous(); }
 
 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
     void canAuthenticateAgainstProtectionSpaceAsync(WebCore::ResourceHandle*, const WebCore::ProtectionSpace&) override;
@@ -122,6 +96,35 @@
     NetworkLoadClient::ShouldContinueDidReceiveResponse sharedDidReceiveResponse(WebCore::ResourceResponse&&);
     void sharedWillSendRedirectedRequest(WebCore::ResourceRequest&&, WebCore::ResourceResponse&&);
 
+    // ResourceHandleClient
+    void willSendRequestAsync(WebCore::ResourceHandle*, WebCore::ResourceRequest&&, WebCore::ResourceResponse&& redirectResponse) override;
+    void didSendData(WebCore::ResourceHandle*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) override;
+    void didReceiveResponseAsync(WebCore::ResourceHandle*, WebCore::ResourceResponse&&) override;
+    void didReceiveData(WebCore::ResourceHandle*, const char*, unsigned, int encodedDataLength) override;
+    void didReceiveBuffer(WebCore::ResourceHandle*, Ref<WebCore::SharedBuffer>&&, int reportedEncodedDataLength) override;
+    void didFinishLoading(WebCore::ResourceHandle*, double finishTime) override;
+    void didFail(WebCore::ResourceHandle*, const WebCore::ResourceError&) override;
+    void wasBlocked(WebCore::ResourceHandle*) override;
+    void cannotShowURL(WebCore::ResourceHandle*) override;
+    bool shouldUseCredentialStorage(WebCore::ResourceHandle*) override;
+    void didReceiveAuthenticationChallenge(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&) override;
+    void receivedCancellation(WebCore::ResourceHandle*, const WebCore::AuthenticationChallenge&) override;
+    bool usesAsyncCallbacks() override { return true; }
+    bool loadingSynchronousXHR() override { return m_client.isSynchronous(); }
+
+#if USE(NETWORK_SESSION)
+    // NetworkDataTaskClient
+    void willPerformHTTPRedirection(WebCore::ResourceResponse&&, WebCore::ResourceRequest&&, RedirectCompletionHandler&&) final;
+    void didReceiveChallenge(const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&) final;
+    void didReceiveResponseNetworkSession(WebCore::ResourceResponse&&, ResponseCompletionHandler&&) final;
+    void didReceiveData(Ref<WebCore::SharedBuffer>&&) final;
+    void didCompleteWithError(const WebCore::ResourceError&) final;
+    void didBecomeDownload() final;
+    void didSendData(uint64_t totalBytesSent, uint64_t totalBytesExpectedToSend) override;
+    void wasBlocked() override;
+    void cannotShowURL() override;
+#endif
+
     NetworkLoadClient& m_client;
     const NetworkLoadParameters m_parameters;
 #if USE(NETWORK_SESSION)

Modified: trunk/Source/WebKit2/NetworkProcess/PingLoad.h (206478 => 206479)


--- trunk/Source/WebKit2/NetworkProcess/PingLoad.h	2016-09-28 00:37:01 UTC (rev 206478)
+++ trunk/Source/WebKit2/NetworkProcess/PingLoad.h	2016-09-28 01:01:29 UTC (rev 206479)
@@ -31,7 +31,7 @@
 
 namespace WebKit {
 
-class PingLoad final : public NetworkDataTaskClient {
+class PingLoad final : private NetworkDataTaskClient {
 public:
     PingLoad(const NetworkResourceLoadParameters& parameters)
         : m_timeoutTimer(*this, &PingLoad::timeoutTimerFired)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to