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

Unified Diff: net/disk_cache/entry_impl.h

Issue 126179: Disk cache: First pass to add support for sparse entries.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/disk_format.h ('k') | net/disk_cache/entry_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/entry_impl.h
===================================================================
--- net/disk_cache/entry_impl.h (revision 18456)
+++ net/disk_cache/entry_impl.h (working copy)
@@ -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 @@
void SetTimes(base::Time last_used, base::Time last_modified);
private:
- enum {
- NUM_STREAMS = 3
- };
+ enum {
+ NUM_STREAMS = 3
+ };
~EntryImpl();
@@ -138,6 +140,9 @@
// 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 @@
// 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);
};
« no previous file with comments | « net/disk_cache/disk_format.h ('k') | net/disk_cache/entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698