mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-06 14:44:26 +00:00
bug #48546. The cache channel should delegate the handling of load attributes to the cache channel (ie. disk/memory channel)...
This commit is contained in:
parent
4d847abd11
commit
749abe34f1
13
netwerk/cache/mgr/nsCacheEntryChannel.cpp
vendored
13
netwerk/cache/mgr/nsCacheEntryChannel.cpp
vendored
@ -36,8 +36,7 @@ nsCacheEntryChannel::nsCacheEntryChannel(
|
||||
nsILoadGroup* aLoadGroup):
|
||||
nsChannelProxy(aChannel),
|
||||
mCacheEntry(aCacheEntry),
|
||||
mLoadGroup(aLoadGroup),
|
||||
mLoadAttributes(0)
|
||||
mLoadGroup(aLoadGroup)
|
||||
{
|
||||
NS_ASSERTION(aCacheEntry->mChannelCount < 0xFF, "Overflowed channel counter");
|
||||
mCacheEntry->mChannelCount++;
|
||||
@ -197,10 +196,6 @@ nsCacheEntryChannel::AsyncRead(nsIStreamListener *aListener, nsISupports *aConte
|
||||
|
||||
mCacheEntry->NoteAccess();
|
||||
|
||||
if (mLoadGroup) {
|
||||
mLoadGroup->GetDefaultLoadAttributes(&mLoadAttributes);
|
||||
}
|
||||
|
||||
rv = mChannel->AsyncRead(aListener, aContext);
|
||||
|
||||
return rv;
|
||||
@ -226,15 +221,13 @@ nsCacheEntryChannel::GetLoadGroup(nsILoadGroup* *aLoadGroup)
|
||||
NS_IMETHODIMP
|
||||
nsCacheEntryChannel::GetLoadAttributes(nsLoadFlags *aLoadAttributes)
|
||||
{
|
||||
*aLoadAttributes = mLoadAttributes;
|
||||
return NS_OK;
|
||||
return mChannel->GetLoadAttributes(aLoadAttributes);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCacheEntryChannel::SetLoadAttributes(nsLoadFlags aLoadAttributes)
|
||||
{
|
||||
mLoadAttributes = aLoadAttributes;
|
||||
return NS_OK;
|
||||
return mChannel->SetLoadAttributes(aLoadAttributes);
|
||||
}
|
||||
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
|
1
netwerk/cache/mgr/nsCacheEntryChannel.h
vendored
1
netwerk/cache/mgr/nsCacheEntryChannel.h
vendored
@ -76,7 +76,6 @@ protected:
|
||||
private:
|
||||
nsCOMPtr<nsCachedNetData> mCacheEntry;
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
||||
nsLoadFlags mLoadAttributes;
|
||||
};
|
||||
|
||||
#endif // _nsCacheEntryChannel_h_
|
||||
|
Loading…
x
Reference in New Issue
Block a user