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

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

Issue 119072: Disk cache: Interface for the sparse cache support.... (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_MEM_ENTRY_IMPL_H__ 5 #ifndef NET_DISK_CACHE_MEM_ENTRY_IMPL_H__
6 #define NET_DISK_CACHE_MEM_ENTRY_IMPL_H__ 6 #define NET_DISK_CACHE_MEM_ENTRY_IMPL_H__
7 7
8 #include "net/disk_cache/disk_cache.h" 8 #include "net/disk_cache/disk_cache.h"
9 9
10 namespace disk_cache { 10 namespace disk_cache {
(...skipping 11 matching lines...) Expand all
22 virtual void Close(); 22 virtual void Close();
23 virtual std::string GetKey() const; 23 virtual std::string GetKey() const;
24 virtual base::Time GetLastUsed() const; 24 virtual base::Time GetLastUsed() const;
25 virtual base::Time GetLastModified() const; 25 virtual base::Time GetLastModified() const;
26 virtual int32 GetDataSize(int index) const; 26 virtual int32 GetDataSize(int index) const;
27 virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len, 27 virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len,
28 net::CompletionCallback* completion_callback); 28 net::CompletionCallback* completion_callback);
29 virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, 29 virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
30 net::CompletionCallback* completion_callback, 30 net::CompletionCallback* completion_callback,
31 bool truncate); 31 bool truncate);
32 virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
33 net::CompletionCallback* completion_callback);
34 virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
35 net::CompletionCallback* completion_callback);
36 virtual int GetAvailableRange(int64 offset, int len, int64* start);
32 37
33 // Performs the initialization of a EntryImpl that will be added to the 38 // Performs the initialization of a EntryImpl that will be added to the
34 // cache. 39 // cache.
35 bool CreateEntry(const std::string& key); 40 bool CreateEntry(const std::string& key);
36 41
37 // Permamently destroys this entry 42 // Permamently destroys this entry
38 void InternalDoom(); 43 void InternalDoom();
39 44
40 MemEntryImpl* next() const { 45 MemEntryImpl* next() const {
41 return next_; 46 return next_;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 base::Time last_used_; 85 base::Time last_used_;
81 MemBackendImpl* backend_; // Back pointer to the cache. 86 MemBackendImpl* backend_; // Back pointer to the cache.
82 bool doomed_; // True if this entry was removed from the cache. 87 bool doomed_; // True if this entry was removed from the cache.
83 88
84 DISALLOW_EVIL_CONSTRUCTORS(MemEntryImpl); 89 DISALLOW_EVIL_CONSTRUCTORS(MemEntryImpl);
85 }; 90 };
86 91
87 } // namespace disk_cache 92 } // namespace disk_cache
88 93
89 #endif // NET_DISK_CACHE_MEM_ENTRY_IMPL_H__ 94 #endif // NET_DISK_CACHE_MEM_ENTRY_IMPL_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698