Remove unused initiatingPage parameter from download objects
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Dec 2012 18:44:09 +0000 (18:44 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Dec 2012 18:44:09 +0000 (18:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=104933

Reviewed by Alexey Proskuryakov.

* WebProcess/Downloads/Download.h:
(Download):
* WebProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
(WebKit::DownloadManager::convertHandleToDownload):
* WebProcess/Downloads/DownloadManager.h:
(DownloadManager):
* WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
* WebProcess/Downloads/curl/DownloadCurl.cpp:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
* WebProcess/Downloads/mac/DownloadMac.mm:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
* WebProcess/Downloads/qt/DownloadQt.cpp:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
* WebProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::convertHandleToDownload):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::downloadRequest):

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

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Downloads/Download.h
Source/WebKit2/WebProcess/Downloads/DownloadManager.cpp
Source/WebKit2/WebProcess/Downloads/DownloadManager.h
Source/WebKit2/WebProcess/Downloads/cfnet/DownloadCFNet.cpp
Source/WebKit2/WebProcess/Downloads/curl/DownloadCurl.cpp
Source/WebKit2/WebProcess/Downloads/mac/DownloadMac.mm
Source/WebKit2/WebProcess/Downloads/qt/DownloadQt.cpp
Source/WebKit2/WebProcess/Downloads/soup/DownloadSoup.cpp
Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
Source/WebKit2/WebProcess/WebProcess.cpp

index 71e5036..c164701 100644 (file)
@@ -1,3 +1,38 @@
+2012-12-13  Anders Carlsson  <andersca@apple.com>
+
+        Remove unused initiatingPage parameter from download objects
+        https://bugs.webkit.org/show_bug.cgi?id=104933
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebProcess/Downloads/Download.h:
+        (Download):
+        * WebProcess/Downloads/DownloadManager.cpp:
+        (WebKit::DownloadManager::startDownload):
+        (WebKit::DownloadManager::convertHandleToDownload):
+        * WebProcess/Downloads/DownloadManager.h:
+        (DownloadManager):
+        * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
+        (WebKit::Download::start):
+        (WebKit::Download::startWithHandle):
+        * WebProcess/Downloads/curl/DownloadCurl.cpp:
+        (WebKit::Download::start):
+        (WebKit::Download::startWithHandle):
+        * WebProcess/Downloads/mac/DownloadMac.mm:
+        (WebKit::Download::start):
+        (WebKit::Download::startWithHandle):
+        * WebProcess/Downloads/qt/DownloadQt.cpp:
+        (WebKit::Download::start):
+        (WebKit::Download::startWithHandle):
+        * WebProcess/Downloads/soup/DownloadSoup.cpp:
+        (WebKit::Download::start):
+        (WebKit::Download::startWithHandle):
+        * WebProcess/WebPage/WebFrame.cpp:
+        (WebKit::WebFrame::startDownload):
+        (WebKit::WebFrame::convertHandleToDownload):
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::downloadRequest):
+
 2012-12-13  Alexey Proskuryakov  <ap@apple.com>
 
         <rdar://problem/12870065> Frequent NetworkProcess crashes due to null connection when closing tabs
index d751087..a9de34e 100644 (file)
@@ -79,8 +79,8 @@ public:
     CoreIPC::Connection* connection() const;
     uint64_t destinationID() const { return downloadID(); }
 
-    void start(WebPage* initiatingWebPage);
-    void startWithHandle(WebPage* initiatingPage, WebCore::ResourceHandle*, const WebCore::ResourceResponse&);
+    void start();
+    void startWithHandle(WebCore::ResourceHandle*, const WebCore::ResourceResponse&);
     void cancel();
 
     uint64_t downloadID() const { return m_downloadID; }
index 2ed1194..4b25f79 100644 (file)
@@ -44,20 +44,20 @@ DownloadManager::DownloadManager()
 {
 }
 
-void DownloadManager::startDownload(uint64_t downloadID, WebPage* initiatingPage, const ResourceRequest& request)
+void DownloadManager::startDownload(uint64_t downloadID, const ResourceRequest& request)
 {
     OwnPtr<Download> download = Download::create(downloadID, request);
-    download->start(initiatingPage);
+    download->start();
 
     ASSERT(!m_downloads.contains(downloadID));
     m_downloads.set(downloadID, download.leakPtr());
 }
 
-void DownloadManager::convertHandleToDownload(uint64_t downloadID, WebPage* initiatingPage, ResourceHandle* handle, const ResourceRequest& request, const ResourceResponse& response)
+void DownloadManager::convertHandleToDownload(uint64_t downloadID, ResourceHandle* handle, const ResourceRequest& request, const ResourceResponse& response)
 {
     OwnPtr<Download> download = Download::create(downloadID, request);
 
-    download->startWithHandle(initiatingPage, handle, response);
+    download->startWithHandle(handle, response);
     ASSERT(!m_downloads.contains(downloadID));
     m_downloads.set(downloadID, download.leakPtr());
 }
index 9124c03..812e9b8 100644 (file)
@@ -50,8 +50,8 @@ class DownloadManager {
 public:
     static DownloadManager& shared();
 
-    void startDownload(uint64_t downloadID, WebPage* initiatingPage, const WebCore::ResourceRequest&);
-    void convertHandleToDownload(uint64_t downloadID, WebPage* initiatingPage, WebCore::ResourceHandle*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
+    void startDownload(uint64_t downloadID, const WebCore::ResourceRequest&);
+    void convertHandleToDownload(uint64_t downloadID, WebCore::ResourceHandle*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
 
     void cancelDownload(uint64_t downloadID);
 
index 1629677..a0f3d0b 100644 (file)
@@ -86,7 +86,7 @@ DownloadAuthenticationClient* Download::authenticationClient()
     return m_authenticationClient.get();
 }
 
-void Download::start(WebPage*)
+void Download::start()
 {
     ASSERT(!m_download);
 
@@ -108,7 +108,7 @@ void Download::start(WebPage*)
     CFURLDownloadStart(m_download.get());
 }
 
-void Download::startWithHandle(WebPage*, ResourceHandle* handle, const ResourceResponse& response)
+void Download::startWithHandle(ResourceHandle* handle, const ResourceResponse& response)
 {
     ASSERT(!m_download);
 
index 38cfa6f..05607ef 100644 (file)
@@ -33,12 +33,12 @@ using namespace WebCore;
 
 namespace WebKit {
 
-void Download::start(WebPage* initiatingWebPage)
+void Download::start()
 {
     notImplemented();
 }
 
-void Download::startWithHandle(WebPage* initiatingPage, ResourceHandle*, const ResourceResponse&)
+void Download::startWithHandle(ResourceHandle*, const ResourceResponse&)
 {
     notImplemented();
 }
index 83108b1..f5d9407 100644 (file)
@@ -52,7 +52,7 @@ using namespace WebCore;
 
 namespace WebKit {
 
-void Download::start(WebPage* initiatingPage)
+void Download::start()
 {
     ASSERT(!m_nsURLDownload);
     ASSERT(!m_delegate);
@@ -64,7 +64,7 @@ void Download::start(WebPage* initiatingPage)
     [m_nsURLDownload.get() setDeletesFileUponFailure:NO];
 }
 
-void Download::startWithHandle(WebPage* initiatingPage, ResourceHandle* handle, const ResourceResponse& response)
+void Download::startWithHandle(ResourceHandle* handle, const ResourceResponse& response)
 {
     ASSERT(!m_nsURLDownload);
     ASSERT(!m_delegate);
index c36478b..889e471 100644 (file)
@@ -39,7 +39,7 @@ using namespace WebCore;
 
 namespace WebKit {
 
-void Download::start(WebPage* initiatingWebPage)
+void Download::start()
 {
     QNetworkAccessManager* manager = WebProcess::shared().networkAccessManager();
     ASSERT(manager);
@@ -49,7 +49,7 @@ void Download::start(WebPage* initiatingWebPage)
     m_qtDownloader->init();
 }
 
-void Download::startWithHandle(WebPage* initiatingPage, ResourceHandle* handle, const ResourceResponse& resp)
+void Download::startWithHandle(ResourceHandle* handle, const ResourceResponse& resp)
 {
     ASSERT(!m_qtDownloader);
     m_qtDownloader = new QtFileDownloader(this, adoptPtr(handle->getInternal()->m_job->release()));
index ab4b6ee..11e0a41 100644 (file)
@@ -179,7 +179,7 @@ public:
     unsigned m_handleResponseLaterID;
 };
 
-void Download::start(WebPage*)
+void Download::start()
 {
     ASSERT(!m_downloadClient);
     ASSERT(!m_resourceHandle);
@@ -188,7 +188,7 @@ void Download::start(WebPage*)
     didStart();
 }
 
-void Download::startWithHandle(WebPage*, ResourceHandle* resourceHandle, const ResourceResponse& response)
+void Download::startWithHandle(ResourceHandle* resourceHandle, const ResourceResponse& response)
 {
     ASSERT(!m_downloadClient);
     ASSERT(!m_resourceHandle);
index 10a2c8c..bc22529 100644 (file)
@@ -236,7 +236,7 @@ void WebFrame::startDownload(const WebCore::ResourceRequest& request)
 {
     ASSERT(m_policyDownloadID);
 
-    DownloadManager::shared().startDownload(m_policyDownloadID, page(), request);
+    DownloadManager::shared().startDownload(m_policyDownloadID, request);
 
     m_policyDownloadID = 0;
 }
@@ -245,7 +245,7 @@ void WebFrame::convertHandleToDownload(ResourceHandle* handle, const ResourceReq
 {
     ASSERT(m_policyDownloadID);
 
-    DownloadManager::shared().convertHandleToDownload(m_policyDownloadID, page(), handle, request, response);
+    DownloadManager::shared().convertHandleToDownload(m_policyDownloadID, handle, request, response);
     m_policyDownloadID = 0;
 }
 
index 0125d84..f736020 100644 (file)
@@ -1143,7 +1143,7 @@ void WebProcess::downloadRequest(uint64_t downloadID, uint64_t initiatingPageID,
     if (initiatingPage)
         initiatingPage->mainFrame()->loader()->setOriginalURLForDownloadRequest(requestWithOriginalURL);
 
-    DownloadManager::shared().startDownload(downloadID, initiatingPage, requestWithOriginalURL);
+    DownloadManager::shared().startDownload(downloadID, requestWithOriginalURL);
 }
 
 void WebProcess::cancelDownload(uint64_t downloadID)