Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Unified Diff: net/disk_cache/entry_impl.h

Issue 12880: Disk cache: Add support for an extra data stream for each cache entry.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/disk_cache/entry_impl.h
===================================================================
--- net/disk_cache/entry_impl.h (revision 6334)
+++ net/disk_cache/entry_impl.h (working copy)
@@ -89,11 +89,12 @@
void SetTimes(base::Time last_used, base::Time last_modified);
private:
+ enum {
+ NUM_STREAMS = 3
+ };
+
~EntryImpl();
- // Index for the file used to store the key, if any (files_[kKeyFileIndex]).
- static const int kKeyFileIndex = 2;
-
// Initializes the storage for an internal or external data block.
bool CreateDataBlock(int index, int size);
@@ -134,9 +135,10 @@
CacheEntryBlock entry_; // Key related information for this entry.
CacheRankingsBlock node_; // Rankings related information for this entry.
BackendImpl* backend_; // Back pointer to the cache.
- scoped_array<char> user_buffers_[2]; // Store user data.
- scoped_refptr<File> files_[3]; // Files to store external user data and key.
- int unreported_size_[2]; // Bytes not reported yet to the backend.
+ scoped_array<char> user_buffers_[NUM_STREAMS]; // Store user data.
+ scoped_refptr<File> files_[NUM_STREAMS + 1]; // Files to store external user
+ // data and key.
+ int unreported_size_[NUM_STREAMS]; // Bytes not reported yet to the backend.
bool doomed_; // True if this entry was removed from the cache.
DISALLOW_EVIL_CONSTRUCTORS(EntryImpl);

Powered by Google App Engine
This is Rietveld 408576698