mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-11 14:28:42 +00:00
Bug 342375 Resume/Pause can not work in download.
Patch by leon.sha@sun.com. darin: review+
This commit is contained in:
parent
939cd4d9d3
commit
73a492ca4a
@ -1846,6 +1846,7 @@ nsDownload::nsDownload():mDownloadState(nsIDownloadManager::DOWNLOAD_NOTSTARTED)
|
||||
mMaxBytes(LL_ZERO),
|
||||
mStartTime(LL_ZERO),
|
||||
mLastUpdate(PR_Now() - (PRUint32)gInterval),
|
||||
mPaused(PR_FALSE),
|
||||
mSpeed(0)
|
||||
{
|
||||
}
|
||||
@ -2353,10 +2354,12 @@ nsDownload::Pause(PRBool aPaused)
|
||||
if (mRequest) {
|
||||
if (aPaused) {
|
||||
mRequest->Suspend();
|
||||
mPaused = PR_TRUE;
|
||||
mDownloadState = nsIDownloadManager::DOWNLOAD_PAUSED;
|
||||
}
|
||||
else {
|
||||
mRequest->Resume();
|
||||
mPaused = PR_FALSE;
|
||||
mDownloadState = nsIDownloadManager::DOWNLOAD_DOWNLOADING;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user