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

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

Issue 256090: Disk cache: Add a method to cancel pending sparse operations.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months 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/disk_cache/sparse_control.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/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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 // If the next child is discontinuous, break the loop. 312 // If the next child is discontinuous, break the loop.
313 if (FindNextChild(*start + continuous, len, &current_child)) 313 if (FindNextChild(*start + continuous, len, &current_child))
314 break; 314 break;
315 } 315 }
316 return continuous; 316 return continuous;
317 } 317 }
318 *start = offset; 318 *start = offset;
319 return 0; 319 return 0;
320 } 320 }
321 321
322 int MemEntryImpl::ReadyForSparseIO(
323 net::CompletionCallback* completion_callback) {
324 return net::OK;
325 }
326
322 // ------------------------------------------------------------------------ 327 // ------------------------------------------------------------------------
323 328
324 bool MemEntryImpl::CreateEntry(const std::string& key) { 329 bool MemEntryImpl::CreateEntry(const std::string& key) {
325 key_ = key; 330 key_ = key;
326 last_modified_ = Time::Now(); 331 last_modified_ = Time::Now();
327 last_used_ = Time::Now(); 332 last_used_ = Time::Now();
328 Open(); 333 Open();
329 backend_->ModifyStorageSize(0, static_cast<int32>(key.size())); 334 backend_->ModifyStorageSize(0, static_cast<int32>(key.size()));
330 return true; 335 return true;
331 } 336 }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 scanned_len += kMaxSparseEntrySize - current_child_offset; 485 scanned_len += kMaxSparseEntrySize - current_child_offset;
481 } 486 }
482 return scanned_len; 487 return scanned_len;
483 } 488 }
484 489
485 void MemEntryImpl::DetachChild(int child_id) { 490 void MemEntryImpl::DetachChild(int child_id) {
486 children_->erase(child_id); 491 children_->erase(child_id);
487 } 492 }
488 493
489 } // namespace disk_cache 494 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/mem_entry_impl.h ('k') | net/disk_cache/sparse_control.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698