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; |
104 virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, | 107 virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, |
105 net::OldCompletionCallback* completion_callback, | 108 net::OldCompletionCallback* completion_callback, |
106 bool truncate) OVERRIDE; | 109 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; |
107 virtual int ReadSparseData( | 113 virtual int ReadSparseData( |
108 int64 offset, net::IOBuffer* buf, int buf_len, | 114 int64 offset, net::IOBuffer* buf, int buf_len, |
109 net::OldCompletionCallback* completion_callback) OVERRIDE; | 115 net::OldCompletionCallback* completion_callback) OVERRIDE; |
110 virtual int WriteSparseData( | 116 virtual int WriteSparseData( |
111 int64 offset, net::IOBuffer* buf, int buf_len, | 117 int64 offset, net::IOBuffer* buf, int buf_len, |
112 net::OldCompletionCallback* completion_callback) OVERRIDE; | 118 net::OldCompletionCallback* completion_callback) OVERRIDE; |
113 virtual int GetAvailableRange(int64 offset, int len, int64* start, | 119 virtual int GetAvailableRange(int64 offset, int len, int64* start, |
114 OldCompletionCallback* callback) OVERRIDE; | 120 OldCompletionCallback* callback) OVERRIDE; |
115 virtual bool CouldBeSparse() const OVERRIDE; | 121 virtual bool CouldBeSparse() const OVERRIDE; |
116 virtual void CancelSparseIO() OVERRIDE {} | 122 virtual void CancelSparseIO() OVERRIDE {} |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 bool doomed_; // True if this entry was removed from the cache. | 191 bool doomed_; // True if this entry was removed from the cache. |
186 | 192 |
187 net::BoundNetLog net_log_; | 193 net::BoundNetLog net_log_; |
188 | 194 |
189 DISALLOW_COPY_AND_ASSIGN(MemEntryImpl); | 195 DISALLOW_COPY_AND_ASSIGN(MemEntryImpl); |
190 }; | 196 }; |
191 | 197 |
192 } // namespace disk_cache | 198 } // namespace disk_cache |
193 | 199 |
194 #endif // NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ | 200 #endif // NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ |
OLD | NEW |