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:
rpotts%netscape.com 2000-08-24 22:54:45 +00:00
Родитель 54b693f946
Коммит a332472a5a
2 изменённых файлов: 3 добавлений и 11 удалений

13
netwerk/cache/mgr/nsCacheEntryChannel.cpp поставляемый
Просмотреть файл

@ -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 поставляемый
Просмотреть файл

@ -76,7 +76,6 @@ protected:
private:
nsCOMPtr<nsCachedNetData> mCacheEntry;
nsCOMPtr<nsILoadGroup> mLoadGroup;
nsLoadFlags mLoadAttributes;
};
#endif // _nsCacheEntryChannel_h_