mChannel->mRecord->SetStoredContentLength(mTotalSize);
if (mTotalSize < mOldLength) {    mChannel->mRecord->SetStoredContentLength(mTotalSize); } else if (mTotalSize > mOldLength) {  mChannel->NotifyStorageInUse(mTotalSize - mOldLength); }
WriteStreamWrapper::Close() {  nsresult rv = mBaseStream->Close();   // Tell the record we finished write to the file  mChannel->mRecord->WriteComplete();  // Truncate the file if we have to. It should have been already but that  // would be too easy wouldn't it!!!  mChannel->mRecord->SetStoredContentLength(mTotalSize);  return rv;}