OLD | NEW |
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 Loading... |
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 base::PlatformFile UseExternalFile(int index) { | |
33 // MemEntryImpl doesn't support caching to an external file. | |
34 return base::kInvalidPlatformFileValue; | |
35 } | |
36 virtual base::PlatformFile GetPlatformFile(int index) { | |
37 // MemEntryImpl doesn't support caching to an external file. | |
38 return base::kInvalidPlatformFileValue; | |
39 } | |
40 | 32 |
41 // Performs the initialization of a EntryImpl that will be added to the | 33 // Performs the initialization of a EntryImpl that will be added to the |
42 // cache. | 34 // cache. |
43 bool CreateEntry(const std::string& key); | 35 bool CreateEntry(const std::string& key); |
44 | 36 |
45 // Permamently destroys this entry | 37 // Permamently destroys this entry |
46 void InternalDoom(); | 38 void InternalDoom(); |
47 | 39 |
48 MemEntryImpl* next() const { | 40 MemEntryImpl* next() const { |
49 return next_; | 41 return next_; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 base::Time last_used_; | 80 base::Time last_used_; |
89 MemBackendImpl* backend_; // Back pointer to the cache. | 81 MemBackendImpl* backend_; // Back pointer to the cache. |
90 bool doomed_; // True if this entry was removed from the cache. | 82 bool doomed_; // True if this entry was removed from the cache. |
91 | 83 |
92 DISALLOW_EVIL_CONSTRUCTORS(MemEntryImpl); | 84 DISALLOW_EVIL_CONSTRUCTORS(MemEntryImpl); |
93 }; | 85 }; |
94 | 86 |
95 } // namespace disk_cache | 87 } // namespace disk_cache |
96 | 88 |
97 #endif // NET_DISK_CACHE_MEM_ENTRY_IMPL_H__ | 89 #endif // NET_DISK_CACHE_MEM_ENTRY_IMPL_H__ |
OLD | NEW |