active cache entries when devices are shutdown.
Fix bug 88768 [a=nisheeth], fixing unary operator usage in nsCacheEntryDescriptor.cpp.
git-svn-id: svn://10.0.0.236/trunk@103015 18797224-902f-48f8-a5cc-f745e15eee43
Removed return codes for nsCacheEntryHashtable::RemoveEntry() and nsCacheDevice::DoomEntry().
Added doomEntriesIfExpired flag to nsCacheSession and nsCacheRequest, and check the flag in nsCacheService::ActivateEntry()
Added lastModified attribute to nsCacheEntryDescriptor and mLastModified data member to nsCacheEntry. mLastModified is updated when data or meta data is changed.
Deque requests if descriptor allocation fails. Delete requests after calling proxy in async open cache entry path.
Cleaned up the logic of doom.
git-svn-id: svn://10.0.0.236/trunk@88929 18797224-902f-48f8-a5cc-f745e15eee43
Added rough cut of pref code for memory cache device to get cache size, and implemented simple eviction method.
Restructured nsCacheEntryDescriptor to add SecurityInfo attribute. Created nsTransportWrapper as nested class (and member) that addrefs the descriptor instead of itself (like nsPipe). Also rename nsCacheOutputStream to nsOutputStreamWrapper and made it a nested class as well.
git-svn-id: svn://10.0.0.236/trunk@88816 18797224-902f-48f8-a5cc-f745e15eee43
Restructured open cache entry code in preparation for async implementation, to better share code with synchronous version.
Changed nsCacheRequest, nsCacheEntry, nsCacheEntryDescriptor to inherit from PRCList rather than include mListLink member, and removed extraneous GetListNode/GetInstance methods.
Consolidated mAccessRequested, mStreamBased, and mStoragePolicy into a single PRUint32 in nsCacheRequest. Added PRLock, PRCondVar, and a 'wait for validation' flag, used for synchronously opening cache entries. Added accessor functions for these "attributes".
Record current event queue for asychronous requests to be used with GetProxyForObject(). Removed mRequestThread.
git-svn-id: svn://10.0.0.236/trunk@88535 18797224-902f-48f8-a5cc-f745e15eee43
Fixed cache meta data. Implemented eviction list for memory cache device. Worked on entry deactivation, validation, and doom.
git-svn-id: svn://10.0.0.236/trunk@88364 18797224-902f-48f8-a5cc-f745e15eee43
Add utility method to nsCacheEntryDescriptor to change the data size for the associated cache entry.
git-svn-id: svn://10.0.0.236/trunk@88309 18797224-902f-48f8-a5cc-f745e15eee43
Changed OnDataSizeChanged() to OnDataSizeChange() and added a deltaSize parameter. Added OnDataSizeChange() method on nsCacheService so we can grab the service lock and bind the entry if necessary.
Commented out the implementation of nsCacheEntryDescriptor::AsyncWrite(), since we are not planning to provide it.
git-svn-id: svn://10.0.0.236/trunk@88275 18797224-902f-48f8-a5cc-f745e15eee43
Changed nsCacheEntryDescriptor to implement nsITransport as a wrapper that checks access priviledges for the underlying transport provided by the device.
Added code to lazily allocate the underlying transport for the cache descriptor.
Added NS_ENSURE_ARG_POINTER() to all necessary interface methods. r=beard.
git-svn-id: svn://10.0.0.236/trunk@88261 18797224-902f-48f8-a5cc-f745e15eee43
Added a PRCList member and accessors for linking entries on eviction and doom lists.
Moved check for IsStreamBased() from nsCacheEntry::GetData() to nsCacheEntryDescriptor::GetData(), to allow cache devices to set the mData member.
Added checks to nsCacheEntryDescriptor methods to return NS_ERROR_NOT_AVAILABLE if the descriptor is already closed.
git-svn-id: svn://10.0.0.236/trunk@88133 18797224-902f-48f8-a5cc-f745e15eee43