OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 #include "net/disk_cache/mem_entry_impl.h" | 5 #include "net/disk_cache/mem_entry_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/base/io_buffer.h" | 8 #include "net/base/io_buffer.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 #include "net/disk_cache/mem_backend_impl.h" | 10 #include "net/disk_cache/mem_backend_impl.h" |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 // If the next child is discontinuous, break the loop. | 300 // If the next child is discontinuous, break the loop. |
301 if (FindNextChild(*start + continuous, len, ¤t_child)) | 301 if (FindNextChild(*start + continuous, len, ¤t_child)) |
302 break; | 302 break; |
303 } | 303 } |
304 return continuous; | 304 return continuous; |
305 } | 305 } |
306 *start = offset; | 306 *start = offset; |
307 return 0; | 307 return 0; |
308 } | 308 } |
309 | 309 |
| 310 int MemEntryImpl::GetAvailableRange(int64 offset, int len, int64* start, |
| 311 CompletionCallback* callback) { |
| 312 return GetAvailableRange(offset, len, start); |
| 313 } |
| 314 |
310 int MemEntryImpl::ReadyForSparseIO( | 315 int MemEntryImpl::ReadyForSparseIO( |
311 net::CompletionCallback* completion_callback) { | 316 net::CompletionCallback* completion_callback) { |
312 return net::OK; | 317 return net::OK; |
313 } | 318 } |
314 | 319 |
315 // ------------------------------------------------------------------------ | 320 // ------------------------------------------------------------------------ |
316 | 321 |
317 bool MemEntryImpl::CreateEntry(const std::string& key) { | 322 bool MemEntryImpl::CreateEntry(const std::string& key) { |
318 key_ = key; | 323 key_ = key; |
319 last_modified_ = Time::Now(); | 324 last_modified_ = Time::Now(); |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 scanned_len += kMaxSparseEntrySize - current_child_offset; | 478 scanned_len += kMaxSparseEntrySize - current_child_offset; |
474 } | 479 } |
475 return scanned_len; | 480 return scanned_len; |
476 } | 481 } |
477 | 482 |
478 void MemEntryImpl::DetachChild(int child_id) { | 483 void MemEntryImpl::DetachChild(int child_id) { |
479 children_->erase(child_id); | 484 children_->erase(child_id); |
480 } | 485 } |
481 | 486 |
482 } // namespace disk_cache | 487 } // namespace disk_cache |
OLD | NEW |