diff options
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/MozDownload.cpp | 12 | ||||
-rw-r--r-- | embed/mozilla/MozDownload.h | 1 |
2 files changed, 1 insertions, 12 deletions
diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp index f6a592d6d..b3cc63ec8 100644 --- a/embed/mozilla/MozDownload.cpp +++ b/embed/mozilla/MozDownload.cpp @@ -64,8 +64,6 @@ const char* const persistContractID = "@mozilla.org/embedding/browser/nsWebBrows MozDownload::MozDownload() : mMaxSize(-1), - mGotFirstStateChange(false), - mIsNetworkTransfer(false), mStatus(NS_OK), mEmbedPersist(nsnull), mDownloadState(EPHY_DOWNLOAD_DOWNLOADING) @@ -272,19 +270,11 @@ MozDownload::OnStateChange (nsIWebProgress *aWebProgress, nsIRequest *aRequest, { nsresult rv; - /* For a file download via the external helper app service, we will never get a start - notification. The helper app service has gotten that notification before it created us. */ - if (!mGotFirstStateChange) - { - mIsNetworkTransfer = ((aStateFlags & STATE_IS_NETWORK) != 0); - mGotFirstStateChange = PR_TRUE; - } - if (NS_FAILED(aStatus) && NS_SUCCEEDED(mStatus)) mStatus = aStatus; /* We will get this even in the event of a cancel */ - if ((aStateFlags & STATE_STOP) && (!mIsNetworkTransfer || (aStateFlags & STATE_IS_NETWORK))) + if (aStateFlags & STATE_STOP) { /* Keep us alive */ nsCOMPtr<nsIDownload> kungFuDeathGrip(this); diff --git a/embed/mozilla/MozDownload.h b/embed/mozilla/MozDownload.h index e7f51b2e0..ad5cfb169 100644 --- a/embed/mozilla/MozDownload.h +++ b/embed/mozilla/MozDownload.h @@ -124,7 +124,6 @@ protected: PRInt32 mCurrentProgress; PRInt32 mMaxSize; - bool mGotFirstStateChange, mIsNetworkTransfer; nsresult mStatus; nsCOMPtr<nsIObserver> mObserver; |