OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_SIMPLE_SIMPLE_BACKEND_IMPL_H_ | 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ |
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ | 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 Entry** next_entry, | 162 Entry** next_entry, |
163 const CompletionCallback& callback, | 163 const CompletionCallback& callback, |
164 int error_code); | 164 int error_code); |
165 | 165 |
166 // Called when we tried to open an entry with hash alone. When a blank entry | 166 // Called when we tried to open an entry with hash alone. When a blank entry |
167 // has been created and filled in with information from the disk - based on a | 167 // has been created and filled in with information from the disk - based on a |
168 // hash alone - this checks that a duplicate active entry was not created | 168 // hash alone - this checks that a duplicate active entry was not created |
169 // using a key in the meantime. | 169 // using a key in the meantime. |
170 void OnEntryOpenedFromHash(uint64 hash, | 170 void OnEntryOpenedFromHash(uint64 hash, |
171 Entry** entry, | 171 Entry** entry, |
172 scoped_refptr<SimpleEntryImpl> simple_entry, | 172 const scoped_refptr<SimpleEntryImpl>& simple_entry, |
173 const CompletionCallback& callback, | 173 const CompletionCallback& callback, |
174 int error_code); | 174 int error_code); |
175 | 175 |
176 // Called when we tried to open an entry from key. When the entry has been | 176 // Called when we tried to open an entry from key. When the entry has been |
177 // opened, a check for key mismatch is performed. | 177 // opened, a check for key mismatch is performed. |
178 void OnEntryOpenedFromKey(const std::string key, | 178 void OnEntryOpenedFromKey(const std::string key, |
179 Entry** entry, | 179 Entry** entry, |
180 scoped_refptr<SimpleEntryImpl> simple_entry, | 180 const scoped_refptr<SimpleEntryImpl>& simple_entry, |
181 const CompletionCallback& callback, | 181 const CompletionCallback& callback, |
182 int error_code); | 182 int error_code); |
183 | 183 |
184 // Called at the end of the asynchronous operation triggered by | 184 // Called at the end of the asynchronous operation triggered by |
185 // OpenEntryFromHash. Makes sure to continue iterating if the open entry was | 185 // OpenEntryFromHash. Makes sure to continue iterating if the open entry was |
186 // not a success. | 186 // not a success. |
187 void CheckIterationReturnValue(void** iter, | 187 void CheckIterationReturnValue(void** iter, |
188 Entry** entry, | 188 Entry** entry, |
189 const CompletionCallback& callback, | 189 const CompletionCallback& callback, |
190 int error_code); | 190 int error_code); |
(...skipping 20 matching lines...) Expand all Loading... |
211 // is complete. The base::Closure map target is used to store deferred | 211 // is complete. The base::Closure map target is used to store deferred |
212 // operations to be run at the completion of the Doom. | 212 // operations to be run at the completion of the Doom. |
213 base::hash_map<uint64, std::vector<base::Closure> > entries_pending_doom_; | 213 base::hash_map<uint64, std::vector<base::Closure> > entries_pending_doom_; |
214 | 214 |
215 net::NetLog* const net_log_; | 215 net::NetLog* const net_log_; |
216 }; | 216 }; |
217 | 217 |
218 } // namespace disk_cache | 218 } // namespace disk_cache |
219 | 219 |
220 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ | 220 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ |
OLD | NEW |