| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BLOCKFILE_IN_FLIGHT_BACKEND_IO_H_ | 5 #ifndef NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_BACKEND_IO_H_ |
| 6 #define NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_BACKEND_IO_H_ | 6 #define NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_BACKEND_IO_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // The operations we proxy: | 49 // The operations we proxy: |
| 50 void Init(); | 50 void Init(); |
| 51 void OpenEntry(const std::string& key, Entry** entry); | 51 void OpenEntry(const std::string& key, Entry** entry); |
| 52 void CreateEntry(const std::string& key, Entry** entry); | 52 void CreateEntry(const std::string& key, Entry** entry); |
| 53 void DoomEntry(const std::string& key); | 53 void DoomEntry(const std::string& key); |
| 54 void DoomAllEntries(); | 54 void DoomAllEntries(); |
| 55 void DoomEntriesBetween(const base::Time initial_time, | 55 void DoomEntriesBetween(const base::Time initial_time, |
| 56 const base::Time end_time); | 56 const base::Time end_time); |
| 57 void DoomEntriesSince(const base::Time initial_time); | 57 void DoomEntriesSince(const base::Time initial_time); |
| 58 void OpenNextEntry(void** iter, Entry** next_entry); | 58 void OpenNextEntry(void** iter, Entry** next_entry); |
| 59 void OpenPrevEntry(void** iter, Entry** prev_entry); | |
| 60 void EndEnumeration(void* iterator); | 59 void EndEnumeration(void* iterator); |
| 61 void OnExternalCacheHit(const std::string& key); | 60 void OnExternalCacheHit(const std::string& key); |
| 62 void CloseEntryImpl(EntryImpl* entry); | 61 void CloseEntryImpl(EntryImpl* entry); |
| 63 void DoomEntryImpl(EntryImpl* entry); | 62 void DoomEntryImpl(EntryImpl* entry); |
| 64 void FlushQueue(); // Dummy operation. | 63 void FlushQueue(); // Dummy operation. |
| 65 void RunTask(const base::Closure& task); | 64 void RunTask(const base::Closure& task); |
| 66 void ReadData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf, | 65 void ReadData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf, |
| 67 int buf_len); | 66 int buf_len); |
| 68 void WriteData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf, | 67 void WriteData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf, |
| 69 int buf_len, bool truncate); | 68 int buf_len, bool truncate); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 84 enum Operation { | 83 enum Operation { |
| 85 OP_NONE = 0, | 84 OP_NONE = 0, |
| 86 OP_INIT, | 85 OP_INIT, |
| 87 OP_OPEN, | 86 OP_OPEN, |
| 88 OP_CREATE, | 87 OP_CREATE, |
| 89 OP_DOOM, | 88 OP_DOOM, |
| 90 OP_DOOM_ALL, | 89 OP_DOOM_ALL, |
| 91 OP_DOOM_BETWEEN, | 90 OP_DOOM_BETWEEN, |
| 92 OP_DOOM_SINCE, | 91 OP_DOOM_SINCE, |
| 93 OP_OPEN_NEXT, | 92 OP_OPEN_NEXT, |
| 94 OP_OPEN_PREV, | |
| 95 OP_END_ENUMERATION, | 93 OP_END_ENUMERATION, |
| 96 OP_ON_EXTERNAL_CACHE_HIT, | 94 OP_ON_EXTERNAL_CACHE_HIT, |
| 97 OP_CLOSE_ENTRY, | 95 OP_CLOSE_ENTRY, |
| 98 OP_DOOM_ENTRY, | 96 OP_DOOM_ENTRY, |
| 99 OP_FLUSH_QUEUE, | 97 OP_FLUSH_QUEUE, |
| 100 OP_RUN_TASK, | 98 OP_RUN_TASK, |
| 101 OP_MAX_BACKEND, | 99 OP_MAX_BACKEND, |
| 102 OP_READ, | 100 OP_READ, |
| 103 OP_WRITE, | 101 OP_WRITE, |
| 104 OP_READ_SPARSE, | 102 OP_READ_SPARSE, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 void DoomEntry(const std::string& key, | 159 void DoomEntry(const std::string& key, |
| 162 const net::CompletionCallback& callback); | 160 const net::CompletionCallback& callback); |
| 163 void DoomAllEntries(const net::CompletionCallback& callback); | 161 void DoomAllEntries(const net::CompletionCallback& callback); |
| 164 void DoomEntriesBetween(const base::Time initial_time, | 162 void DoomEntriesBetween(const base::Time initial_time, |
| 165 const base::Time end_time, | 163 const base::Time end_time, |
| 166 const net::CompletionCallback& callback); | 164 const net::CompletionCallback& callback); |
| 167 void DoomEntriesSince(const base::Time initial_time, | 165 void DoomEntriesSince(const base::Time initial_time, |
| 168 const net::CompletionCallback& callback); | 166 const net::CompletionCallback& callback); |
| 169 void OpenNextEntry(void** iter, Entry** next_entry, | 167 void OpenNextEntry(void** iter, Entry** next_entry, |
| 170 const net::CompletionCallback& callback); | 168 const net::CompletionCallback& callback); |
| 171 void OpenPrevEntry(void** iter, Entry** prev_entry, | |
| 172 const net::CompletionCallback& callback); | |
| 173 void EndEnumeration(void* iterator); | 169 void EndEnumeration(void* iterator); |
| 174 void OnExternalCacheHit(const std::string& key); | 170 void OnExternalCacheHit(const std::string& key); |
| 175 void CloseEntryImpl(EntryImpl* entry); | 171 void CloseEntryImpl(EntryImpl* entry); |
| 176 void DoomEntryImpl(EntryImpl* entry); | 172 void DoomEntryImpl(EntryImpl* entry); |
| 177 void FlushQueue(const net::CompletionCallback& callback); | 173 void FlushQueue(const net::CompletionCallback& callback); |
| 178 void RunTask(const base::Closure& task, | 174 void RunTask(const base::Closure& task, |
| 179 const net::CompletionCallback& callback); | 175 const net::CompletionCallback& callback); |
| 180 void ReadData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf, | 176 void ReadData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf, |
| 181 int buf_len, const net::CompletionCallback& callback); | 177 int buf_len, const net::CompletionCallback& callback); |
| 182 void WriteData( | 178 void WriteData( |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 BackendImpl* backend_; | 212 BackendImpl* backend_; |
| 217 scoped_refptr<base::SingleThreadTaskRunner> background_thread_; | 213 scoped_refptr<base::SingleThreadTaskRunner> background_thread_; |
| 218 base::WeakPtrFactory<InFlightBackendIO> ptr_factory_; | 214 base::WeakPtrFactory<InFlightBackendIO> ptr_factory_; |
| 219 | 215 |
| 220 DISALLOW_COPY_AND_ASSIGN(InFlightBackendIO); | 216 DISALLOW_COPY_AND_ASSIGN(InFlightBackendIO); |
| 221 }; | 217 }; |
| 222 | 218 |
| 223 } // namespace disk_cache | 219 } // namespace disk_cache |
| 224 | 220 |
| 225 #endif // NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_BACKEND_IO_H_ | 221 #endif // NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_BACKEND_IO_H_ |
| OLD | NEW |