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

Side by Side Diff: net/disk_cache/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/entry_impl.h ('k') | net/disk_cache/mem_backend_impl.h » ('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/entry_impl.h" 5 #include "net/disk_cache/entry_impl.h"
6 6
7 #include "base/histogram.h" 7 #include "base/histogram.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 } 377 }
378 378
379 int EntryImpl::GetAvailableRange(int64 offset, int len, int64* start) { 379 int EntryImpl::GetAvailableRange(int64 offset, int len, int64* start) {
380 int result = InitSparseData(); 380 int result = InitSparseData();
381 if (net::OK != result) 381 if (net::OK != result)
382 return result; 382 return result;
383 383
384 return sparse_->GetAvailableRange(offset, len, start); 384 return sparse_->GetAvailableRange(offset, len, start);
385 } 385 }
386 386
387 int EntryImpl::GetAvailableRange(int64 offset, int len, int64* start,
388 CompletionCallback* callback) {
389 return GetAvailableRange(offset, len, start);
390 }
391
387 void EntryImpl::CancelSparseIO() { 392 void EntryImpl::CancelSparseIO() {
388 if (!sparse_.get()) 393 if (!sparse_.get())
389 return; 394 return;
390 395
391 sparse_->CancelIO(); 396 sparse_->CancelIO();
392 } 397 }
393 398
394 int EntryImpl::ReadyForSparseIO(net::CompletionCallback* completion_callback) { 399 int EntryImpl::ReadyForSparseIO(net::CompletionCallback* completion_callback) {
395 if (!sparse_.get()) 400 if (!sparse_.get())
396 return net::OK; 401 return net::OK;
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 Trace("%s 0x%p 0x%x 0x%x", msg, reinterpret_cast<void*>(this), 923 Trace("%s 0x%p 0x%x 0x%x", msg, reinterpret_cast<void*>(this),
919 entry_.address().value(), node_.address().value()); 924 entry_.address().value(), node_.address().value());
920 925
921 Trace(" data: 0x%x 0x%x 0x%x", entry_.Data()->data_addr[0], 926 Trace(" data: 0x%x 0x%x 0x%x", entry_.Data()->data_addr[0],
922 entry_.Data()->data_addr[1], entry_.Data()->long_key); 927 entry_.Data()->data_addr[1], entry_.Data()->long_key);
923 928
924 Trace(" doomed: %d 0x%x", doomed_, dirty); 929 Trace(" doomed: %d 0x%x", doomed_, dirty);
925 } 930 }
926 931
927 } // namespace disk_cache 932 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/entry_impl.h ('k') | net/disk_cache/mem_backend_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698