Bug 1210617 - [e10s] Implement PrivateBrowsingChannel for ExternalHelperAppParent. r=jduell

This commit is contained in:
Felipe Gomes 2015-11-23 12:20:50 -02:00
parent 71602a360d
commit 22c20e24b3
2 changed files with 8 additions and 0 deletions

View File

@ -32,6 +32,7 @@ NS_IMPL_ISUPPORTS_INHERITED(ExternalHelperAppParent,
nsIRequest,
nsIChannel,
nsIMultiPartChannel,
nsIPrivateBrowsingChannel,
nsIResumableChannel,
nsIStreamListener)
@ -84,6 +85,11 @@ ExternalHelperAppParent::Init(ContentParent *parent,
TabParent* tabParent = TabParent::GetFrom(aBrowser);
if (tabParent->GetOwnerElement())
window = do_QueryInterface(tabParent->GetOwnerElement()->OwnerDoc()->GetWindow());
bool isPrivate = false;
nsCOMPtr<nsILoadContext> loadContext = tabParent->GetLoadContext();
loadContext->GetUsePrivateBrowsing(&isPrivate);
SetPrivate(isPrivate);
}
helperAppService->DoContent(aMimeContentType, this, window,

View File

@ -10,6 +10,7 @@
#include "nsIResumableChannel.h"
#include "nsIStreamListener.h"
#include "nsHashPropertyBag.h"
#include "PrivateBrowsingChannel.h"
namespace IPC {
class URI;
@ -36,6 +37,7 @@ class ExternalHelperAppParent : public PExternalHelperAppParent
, public nsIMultiPartChannel
, public nsIResumableChannel
, public nsIStreamListener
, public net::PrivateBrowsingChannel<ExternalHelperAppParent>
{
typedef mozilla::ipc::OptionalURIParams OptionalURIParams;