Bug 342375 Resume/Pause can not work in download.
Patch by leon.sha@sun.com. darin: review+ git-svn-id: svn://10.0.0.236/trunk@200670 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
a450d306cc
commit
93b3a06079
@ -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