Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: net/disk_cache/mem_entry_impl.cc

Issue 355028: Disk Cache: New interface that enables asynchronous completion... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/disk_cache/mem_entry_impl.h ('k') | net/http/http_cache_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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, &current_child)) 301 if (FindNextChild(*start + continuous, len, &current_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
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
OLDNEW
« no previous file with comments | « net/disk_cache/mem_entry_impl.h ('k') | net/http/http_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698