diff options
Diffstat (limited to 'net/disk_cache/entry_impl.h')
-rw-r--r-- | net/disk_cache/entry_impl.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/net/disk_cache/entry_impl.h b/net/disk_cache/entry_impl.h index 72b38cb..00f44db 100644 --- a/net/disk_cache/entry_impl.h +++ b/net/disk_cache/entry_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -13,11 +13,13 @@ namespace disk_cache { class BackendImpl; +class SparseControl; // This class implements the Entry interface. An object of this // class represents a single entry on the cache. class EntryImpl : public Entry, public base::RefCounted<EntryImpl> { friend class base::RefCounted<EntryImpl>; + friend class SparseControl; public: EntryImpl(BackendImpl* backend, Addr address); @@ -98,9 +100,9 @@ class EntryImpl : public Entry, public base::RefCounted<EntryImpl> { void SetTimes(base::Time last_used, base::Time last_modified); private: - enum { - NUM_STREAMS = 3 - }; + enum { + NUM_STREAMS = 3 + }; ~EntryImpl(); @@ -138,6 +140,9 @@ class EntryImpl : public Entry, public base::RefCounted<EntryImpl> { // Flush the in-memory data to the backing storage. bool Flush(int index, int size, bool async); + // Initializes the sparse control object. Returns a net error code. + int InitSparseData(); + // Logs this entry to the internal trace buffer. void Log(const char* msg); @@ -149,6 +154,8 @@ class EntryImpl : public Entry, public base::RefCounted<EntryImpl> { // 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. + scoped_ptr<SparseControl> sparse_; // Support for sparse entries. + DISALLOW_EVIL_CONSTRUCTORS(EntryImpl); }; |