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

Side by Side Diff: net/disk_cache/entry_impl.h

Issue 165030: Disk Cache: Don't depend on the backend being enabled to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | net/disk_cache/entry_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_DISK_CACHE_ENTRY_IMPL_H_ 5 #ifndef NET_DISK_CACHE_ENTRY_IMPL_H_
6 #define NET_DISK_CACHE_ENTRY_IMPL_H_ 6 #define NET_DISK_CACHE_ENTRY_IMPL_H_
7 7
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "net/disk_cache/disk_cache.h" 9 #include "net/disk_cache/disk_cache.h"
10 #include "net/disk_cache/storage_block.h" 10 #include "net/disk_cache/storage_block.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // Generates a histogram for the time spent working on this operation. 169 // Generates a histogram for the time spent working on this operation.
170 void ReportIOTime(Operation op, const base::Time& start); 170 void ReportIOTime(Operation op, const base::Time& start);
171 171
172 // Logs this entry to the internal trace buffer. 172 // Logs this entry to the internal trace buffer.
173 void Log(const char* msg); 173 void Log(const char* msg);
174 174
175 CacheEntryBlock entry_; // Key related information for this entry. 175 CacheEntryBlock entry_; // Key related information for this entry.
176 CacheRankingsBlock node_; // Rankings related information for this entry. 176 CacheRankingsBlock node_; // Rankings related information for this entry.
177 BackendImpl* backend_; // Back pointer to the cache. 177 BackendImpl* backend_; // Back pointer to the cache.
178 scoped_array<char> user_buffers_[kNumStreams]; // Store user data. 178 scoped_array<char> user_buffers_[kNumStreams]; // Store user data.
179 scoped_refptr<File> files_[kNumStreams + 1]; // Files to store external 179 // Files to store external user data and key.
180 // user data and key. 180 scoped_refptr<File> files_[kNumStreams + 1];
181 // Copy of the file used to store the key. We don't own this object.
182 mutable File* key_file_;
181 int unreported_size_[kNumStreams]; // Bytes not reported yet to the backend. 183 int unreported_size_[kNumStreams]; // Bytes not reported yet to the backend.
182 bool doomed_; // True if this entry was removed from the cache. 184 bool doomed_; // True if this entry was removed from the cache.
183 scoped_ptr<SparseControl> sparse_; // Support for sparse entries. 185 scoped_ptr<SparseControl> sparse_; // Support for sparse entries.
184 186
185 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl); 187 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl);
186 }; 188 };
187 189
188 } // namespace disk_cache 190 } // namespace disk_cache
189 191
190 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_ 192 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_
OLDNEW
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | net/disk_cache/entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698