OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // Entry interface. | 94 // Entry interface. |
95 virtual void Doom() OVERRIDE; | 95 virtual void Doom() OVERRIDE; |
96 virtual void Close() OVERRIDE; | 96 virtual void Close() OVERRIDE; |
97 virtual std::string GetKey() const OVERRIDE; | 97 virtual std::string GetKey() const OVERRIDE; |
98 virtual base::Time GetLastUsed() const OVERRIDE; | 98 virtual base::Time GetLastUsed() const OVERRIDE; |
99 virtual base::Time GetLastModified() const OVERRIDE; | 99 virtual base::Time GetLastModified() const OVERRIDE; |
100 virtual int32 GetDataSize(int index) const OVERRIDE; | 100 virtual int32 GetDataSize(int index) const OVERRIDE; |
101 virtual int ReadData( | 101 virtual int ReadData( |
102 int index, int offset, net::IOBuffer* buf, int buf_len, | 102 int index, int offset, net::IOBuffer* buf, int buf_len, |
103 net::OldCompletionCallback* completion_callback) OVERRIDE; | 103 net::OldCompletionCallback* completion_callback) OVERRIDE; |
104 virtual int ReadData( | |
105 int index, int offset, net::IOBuffer* buf, int buf_len, | |
106 const net::CompletionCallback& completion_callback) OVERRIDE; | |
107 virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, | 104 virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, |
108 net::OldCompletionCallback* completion_callback, | 105 net::OldCompletionCallback* completion_callback, |
109 bool truncate) OVERRIDE; | 106 bool truncate) OVERRIDE; |
110 virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, | |
111 const net::CompletionCallback& completion_callback, | |
112 bool truncate) OVERRIDE; | |
113 virtual int ReadSparseData( | 107 virtual int ReadSparseData( |
114 int64 offset, net::IOBuffer* buf, int buf_len, | 108 int64 offset, net::IOBuffer* buf, int buf_len, |
115 net::OldCompletionCallback* completion_callback) OVERRIDE; | 109 net::OldCompletionCallback* completion_callback) OVERRIDE; |
116 virtual int WriteSparseData( | 110 virtual int WriteSparseData( |
117 int64 offset, net::IOBuffer* buf, int buf_len, | 111 int64 offset, net::IOBuffer* buf, int buf_len, |
118 net::OldCompletionCallback* completion_callback) OVERRIDE; | 112 net::OldCompletionCallback* completion_callback) OVERRIDE; |
119 virtual int GetAvailableRange(int64 offset, int len, int64* start, | 113 virtual int GetAvailableRange(int64 offset, int len, int64* start, |
120 OldCompletionCallback* callback) OVERRIDE; | 114 OldCompletionCallback* callback) OVERRIDE; |
121 virtual bool CouldBeSparse() const OVERRIDE; | 115 virtual bool CouldBeSparse() const OVERRIDE; |
122 virtual void CancelSparseIO() OVERRIDE {} | 116 virtual void CancelSparseIO() OVERRIDE {} |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 bool doomed_; // True if this entry was removed from the cache. | 185 bool doomed_; // True if this entry was removed from the cache. |
192 | 186 |
193 net::BoundNetLog net_log_; | 187 net::BoundNetLog net_log_; |
194 | 188 |
195 DISALLOW_COPY_AND_ASSIGN(MemEntryImpl); | 189 DISALLOW_COPY_AND_ASSIGN(MemEntryImpl); |
196 }; | 190 }; |
197 | 191 |
198 } // namespace disk_cache | 192 } // namespace disk_cache |
199 | 193 |
200 #endif // NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ | 194 #endif // NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ |
OLD | NEW |