diff options
Diffstat (limited to 'src/core/browser_context_adapter_client.h')
-rw-r--r-- | src/core/browser_context_adapter_client.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/core/browser_context_adapter_client.h b/src/core/browser_context_adapter_client.h index faba08591..e1fd02f96 100644 --- a/src/core/browser_context_adapter_client.h +++ b/src/core/browser_context_adapter_client.h @@ -76,6 +76,37 @@ public: SavePage }; + // Keep in sync with content::DownloadInterruptReason + enum DownloadInterruptReason { + NoReason = 0, + FileFailed = 1, + FileAccessDenied = 2, + FileNoSpace = 3, + FileNameTooLong = 5, + FileTooLarge = 6, + FileVirusInfected = 7, + FileTransientError = 10, + FileBlocked = 11, + FileSecurityCheckFailed = 12, + FileTooShort = 13, + FileHashMismatch = 14, + NetworkFailed = 20, + NetworkTimeout = 21, + NetworkDisconnected = 22, + NetworkServerDown = 23, + NetworkInvalidRequest = 24, + ServerFailed = 30, + //ServerNoRange = 31, + ServerBadContent = 33, + ServerUnauthorized = 34, + ServerCertProblem = 35, + ServerForbidden = 36, + ServerUnreachable = 37, + UserCanceled = 40, + //UserShutdown = 41, + //Crash = 50 + }; + struct DownloadItemInfo { const quint32 id; const QUrl url; @@ -88,12 +119,14 @@ public: int savePageFormat; bool accepted; int downloadType; + int downloadInterruptReason; }; virtual ~BrowserContextAdapterClient() { } virtual void downloadRequested(DownloadItemInfo &info) = 0; virtual void downloadUpdated(const DownloadItemInfo &info) = 0; + static QString downloadInterruptReasonToString(DownloadInterruptReason reason); }; } // namespace |