bug #48546. Implement Get/SetLoadAttributes(...)

This commit is contained in:
rpotts%netscape.com 2000-08-24 22:56:41 +00:00
Родитель 749abe34f1
Коммит 17e544aa84
4 изменённых файлов: 14 добавлений и 13 удалений

Просмотреть файл

@ -154,6 +154,7 @@ nsDiskCacheRecordChannel::nsDiskCacheRecordChannel(nsDiskCacheRecord *aRecord,
nsILoadGroup *aLoadGroup)
: mRecord(aRecord),
mLoadGroup(aLoadGroup),
mLoadAttributes(nsIChannel::LOAD_NORMAL),
mStatus(NS_OK)
{
NS_INIT_REFCNT();
@ -440,17 +441,15 @@ nsDiskCacheRecordChannel::AsyncWrite(nsIInputStream *fromStream,
NS_IMETHODIMP
nsDiskCacheRecordChannel::GetLoadAttributes(nsLoadFlags *aLoadAttributes)
{
// Not required to be implemented, since it is implemented by cache manager
NS_NOTREACHED("nsDiskCacheRecordChannel::GetLoadAttributes");
return NS_ERROR_NOT_IMPLEMENTED;
*aLoadAttributes = mLoadAttributes;
return NS_OK;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::SetLoadAttributes(nsLoadFlags aLoadAttributes)
{
// Not required to be implemented, since it is implemented by cache manager
NS_NOTREACHED("nsDiskCacheRecordChannel::SetLoadAttributes");
return NS_ERROR_NOT_IMPLEMENTED;
mLoadAttributes = aLoadAttributes;
return NS_OK;
}
#define DUMMY_TYPE "application/x-unknown-content-type"

Просмотреть файл

@ -64,6 +64,7 @@ class nsDiskCacheRecordChannel : public nsIChannel,
nsDiskCacheRecord* mRecord ;
nsCOMPtr<nsILoadGroup> mLoadGroup ;
nsLoadFlags mLoadAttributes;
nsCOMPtr<nsISupports> mOwner ;
nsCOMPtr<nsIChannel> mFileTransport ;
nsCOMPtr< nsIFile > mSpec ;

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

@ -384,7 +384,8 @@ private:
NS_IMPL_THREADSAFE_ISUPPORTS1(MemCacheWriteStreamWrapper, nsIOutputStream)
nsMemCacheChannel::nsMemCacheChannel(nsMemCacheRecord *aRecord, nsILoadGroup *aLoadGroup)
: mRecord(aRecord), mStartOffset(0), mStatus(NS_OK)
: mRecord(aRecord), mStartOffset(0), mStatus(NS_OK),
mLoadAttributes(nsIChannel::LOAD_NORMAL)
{
NS_INIT_REFCNT();
mRecord->mNumChannels++;
@ -623,17 +624,15 @@ nsMemCacheChannel::SetContentLength(PRInt32 aContentLength)
NS_IMETHODIMP
nsMemCacheChannel::GetLoadAttributes(nsLoadFlags *aLoadAttributes)
{
// Not required to be implemented, since it is implemented by cache manager
NS_NOTREACHED("nsMemCacheChannel::GetLoadAttributes");
return NS_ERROR_NOT_IMPLEMENTED;
*aLoadAttributes = mLoadAttributes;
return NS_OK;
}
NS_IMETHODIMP
nsMemCacheChannel::SetLoadAttributes(nsLoadFlags aLoadAttributes)
{
// Not required to be implemented, since it is implemented by cache manager
NS_NOTREACHED("nsMemCacheChannel::SetLoadAttributes");
return NS_ERROR_NOT_IMPLEMENTED;
mLoadAttributes = aLoadAttributes;
return NS_OK;
}
NS_IMETHODIMP

2
netwerk/cache/memcache/nsMemCacheChannel.h поставляемый
Просмотреть файл

@ -56,6 +56,8 @@ protected:
PRUint32 mStartOffset;
nsresult mStatus;
nsLoadFlags mLoadAttributes;
friend class MemCacheWriteStreamWrapper;
friend class AsyncReadStreamAdaptor;
};