diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2017-04-24 22:40:03 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-04-25 18:29:55 +0000 |
commit | 4bd713d56aa9bb86bc96ea9cb0c64cbf94bf43d4 (patch) | |
tree | 02bd448d49627f059df0d8036fbdb9d9ee883a50 /Source/WebKit2/NetworkProcess/Downloads/qt/QtFileDownloader.h | |
parent | bd3f57b00bee3088971209a0ebc513eb1ef4ba14 (diff) | |
download | qtwebkit-4bd713d56aa9bb86bc96ea9cb0c64cbf94bf43d4.tar.gz |
Import WebKit commit 3040e0455efecd271f1aeef53cf287e75486a70d
Change-Id: I7df106cef8ce93ce33e49ad6fb0d202cd066d87c
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebKit2/NetworkProcess/Downloads/qt/QtFileDownloader.h')
-rw-r--r-- | Source/WebKit2/NetworkProcess/Downloads/qt/QtFileDownloader.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/WebKit2/NetworkProcess/Downloads/qt/QtFileDownloader.h b/Source/WebKit2/NetworkProcess/Downloads/qt/QtFileDownloader.h index 738f38b9c..58f2d5f1f 100644 --- a/Source/WebKit2/NetworkProcess/Downloads/qt/QtFileDownloader.h +++ b/Source/WebKit2/NetworkProcess/Downloads/qt/QtFileDownloader.h @@ -40,10 +40,11 @@ class Download; class QtFileDownloader : public QObject { Q_OBJECT public: - QtFileDownloader(Download*, QNetworkReply*); + QtFileDownloader(Download&, const QNetworkRequest&); + QtFileDownloader(Download&, QNetworkReply*); virtual ~QtFileDownloader(); + void cancel(); - void init(); void startTransfer(const QString& destination); enum DownloadError { @@ -62,14 +63,15 @@ private Q_SLOTS: void onError(QNetworkReply::NetworkError); private: + void makeConnections(); void abortDownloadWritingAndEmitError(QtFileDownloader::DownloadError); void handleDownloadResponse(); - Download* m_download; + Download& m_download; std::unique_ptr<QNetworkReply> m_reply; std::unique_ptr<QFile> m_destinationFile; QNetworkReply::NetworkError m_error; - bool m_headersRead; + bool m_headersRead { false }; }; } // namespace WebKit |