Bug 1255597 - Part 3: Synchronize content-type hint of HttpChannelChild to HttpChannelParent. r=jduell

--HG--
extra : rebase_source : 59b5fadf761e8a11d4f946259d5074ba698a46f5
This commit is contained in:
Stone Shih 2016-03-16 14:03:57 +08:00
parent e6e64c8aec
commit d2be3770c7
4 changed files with 10 additions and 3 deletions

View File

@ -120,6 +120,7 @@ struct HttpChannelOpenArgs
bool blockAuthPrompt;
bool suspendAfterSynthesizeResponse;
bool allowStaleCacheContent;
nsCString contentTypeHint;
};
struct HttpChannelConnectArgs

View File

@ -1927,6 +1927,8 @@ HttpChannelChild::ContinueAsyncOpen()
openArgs.allowStaleCacheContent() = mAllowStaleCacheContent;
openArgs.contentTypeHint() = mContentTypeHint;
nsresult rv = mozilla::ipc::LoadInfoToLoadInfoArgs(mLoadInfo, &openArgs.loadInfo());
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -133,7 +133,7 @@ HttpChannelParent::Init(const HttpChannelCreationArgs& aArgs)
a.cacheKey(), a.schedulingContextID(), a.preflightArgs(),
a.initialRwin(), a.blockAuthPrompt(),
a.suspendAfterSynthesizeResponse(),
a.allowStaleCacheContent());
a.allowStaleCacheContent(), a.contentTypeHint());
}
case HttpChannelCreationArgs::THttpChannelConnectArgs:
{
@ -264,7 +264,8 @@ HttpChannelParent::DoAsyncOpen( const URIParams& aURI,
const uint32_t& aInitialRwin,
const bool& aBlockAuthPrompt,
const bool& aSuspendAfterSynthesizeResponse,
const bool& aAllowStaleCacheContent)
const bool& aAllowStaleCacheContent,
const nsCString& aContentTypeHint)
{
nsCOMPtr<nsIURI> uri = DeserializeURI(aURI);
if (!uri) {
@ -415,6 +416,8 @@ HttpChannelParent::DoAsyncOpen( const URIParams& aURI,
mChannel->SetAllowStaleCacheContent(aAllowStaleCacheContent);
mChannel->SetContentType(aContentTypeHint);
if (priority != nsISupportsPriority::PRIORITY_NORMAL) {
mChannel->SetPriority(priority);
}

View File

@ -141,7 +141,8 @@ protected:
const uint32_t& aInitialRwin,
const bool& aBlockAuthPrompt,
const bool& aSuspendAfterSynthesizeResponse,
const bool& aAllowStaleCacheContent);
const bool& aAllowStaleCacheContent,
const nsCString& aContentTypeHint);
virtual bool RecvSetPriority(const uint16_t& priority) override;
virtual bool RecvSetClassOfService(const uint32_t& cos) override;