mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 1360603 - Mark the save channel as throttleable. r=baku
This commit is contained in:
parent
aa38e1e5c9
commit
9b6f4f8fbc
@ -13,6 +13,7 @@
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIClassOfService.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsILoadContext.h"
|
||||
#include "nsIPrivateBrowsingChannel.h"
|
||||
@ -1497,6 +1498,12 @@ nsresult nsWebBrowserPersist::SaveChannelInternal(
|
||||
return StartUpload(bufferedInputStream, aFile, contentType);
|
||||
}
|
||||
|
||||
// Mark save channel as throttleable.
|
||||
nsCOMPtr<nsIClassOfService> cos(do_QueryInterface(aChannel));
|
||||
if (cos) {
|
||||
cos->AddClassFlags(nsIClassOfService::Throttleable);
|
||||
}
|
||||
|
||||
// Read from the input channel
|
||||
nsresult rv = NS_MaybeOpenChannelUsingAsyncOpen2(aChannel, this);
|
||||
if (rv == NS_ERROR_NO_CONTENT)
|
||||
|
Loading…
Reference in New Issue
Block a user