зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
54b693f946
Коммит
a332472a5a
|
@ -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);
|
||||
|
|
|
@ -76,7 +76,6 @@ protected:
|
|||
private:
|
||||
nsCOMPtr<nsCachedNetData> mCacheEntry;
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
||||
nsLoadFlags mLoadAttributes;
|
||||
};
|
||||
|
||||
#endif // _nsCacheEntryChannel_h_
|
||||
|
|
Загрузка…
Ссылка в новой задаче