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