bug #48546. Implement Get/SetLoadAttributes(...)
git-svn-id: svn://10.0.0.236/trunk@77128 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
3a6bfa541f
commit
cbb475cc52
@ -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 ;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -56,6 +56,8 @@ protected:
|
||||
PRUint32 mStartOffset;
|
||||
nsresult mStatus;
|
||||
|
||||
nsLoadFlags mLoadAttributes;
|
||||
|
||||
friend class MemCacheWriteStreamWrapper;
|
||||
friend class AsyncReadStreamAdaptor;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user