Bug 561693 - e10s HTTP: Provide way for nsHttpChannel to know if it's servicing a remote child. r=dwitte,jdm

This commit is contained in:
Jason Duell 2010-04-26 16:23:43 -07:00
parent da3dd01913
commit 2feb4192d5
2 changed files with 4 additions and 0 deletions

View File

@ -108,6 +108,7 @@ HttpChannelParent::RecvAsyncOpen(const IPC::URI& aURI,
return false; // TODO: send fail msg to child, return true
nsHttpChannel *httpChan = static_cast<nsHttpChannel *>(mChannel.get());
httpChan->SetRemoteChannel();
if (originalUri)
httpChan->SetOriginalURI(originalUri);

View File

@ -129,6 +129,7 @@ public:
public: /* internal necko use only */
typedef void (nsHttpChannel:: *nsAsyncCallback)(void);
nsHttpResponseHead * GetResponseHead() const { return mResponseHead; }
void SetRemoteChannel() { mRemoteChannel = 1; }
nsresult SetReferrerInternal(nsIURI *referrer) {
nsCAutoString spec;
@ -351,6 +352,8 @@ private:
// headers. In such a case we must not override them in the cache code
// and also we want to pass possible 304 code response through.
PRUint32 mCustomConditionalRequest : 1;
// True iff this channel is servicing a remote HttpChannelChild
PRUint32 mRemoteChannel : 1;
class nsContentEncodings : public nsIUTF8StringEnumerator
{