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

Side by Side Diff: net/disk_cache/simple/simple_entry_impl.cc

Issue 22926031: Sparse IO: Allow failover to network in debug builds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trying another upload, hopefully it will override the previous "old chunk mismatch" Created 7 years, 3 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 | « no previous file | net/http/http_cache_transaction.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) 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 #include "net/disk_cache/simple/simple_entry_impl.h" 5 #include "net/disk_cache/simple/simple_entry_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 void SimpleEntryImpl::CancelSparseIO() { 489 void SimpleEntryImpl::CancelSparseIO() {
490 DCHECK(io_thread_checker_.CalledOnValidThread()); 490 DCHECK(io_thread_checker_.CalledOnValidThread());
491 // TODO(gavinp): Determine if the simple backend should support sparse data. 491 // TODO(gavinp): Determine if the simple backend should support sparse data.
492 NOTIMPLEMENTED(); 492 NOTIMPLEMENTED();
493 } 493 }
494 494
495 int SimpleEntryImpl::ReadyForSparseIO(const CompletionCallback& callback) { 495 int SimpleEntryImpl::ReadyForSparseIO(const CompletionCallback& callback) {
496 DCHECK(io_thread_checker_.CalledOnValidThread()); 496 DCHECK(io_thread_checker_.CalledOnValidThread());
497 // TODO(gavinp): Determine if the simple backend should support sparse data. 497 // TODO(gavinp): Determine if the simple backend should support sparse data.
498 NOTIMPLEMENTED(); 498 NOTIMPLEMENTED();
499 return net::ERR_FAILED; 499 return net::ERR_NOT_IMPLEMENTED;
500 } 500 }
501 501
502 SimpleEntryImpl::~SimpleEntryImpl() { 502 SimpleEntryImpl::~SimpleEntryImpl() {
503 DCHECK(io_thread_checker_.CalledOnValidThread()); 503 DCHECK(io_thread_checker_.CalledOnValidThread());
504 DCHECK_EQ(0U, pending_operations_.size()); 504 DCHECK_EQ(0U, pending_operations_.size());
505 DCHECK(state_ == STATE_UNINITIALIZED || state_ == STATE_FAILURE); 505 DCHECK(state_ == STATE_UNINITIALIZED || state_ == STATE_FAILURE);
506 DCHECK(!synchronous_entry_); 506 DCHECK(!synchronous_entry_);
507 RemoveSelfFromBackend(); 507 RemoveSelfFromBackend();
508 net_log_.EndEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY); 508 net_log_.EndEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY);
509 } 509 }
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 } else { 1195 } else {
1196 type = conflicting ? WRITE_FOLLOWS_CONFLICTING_WRITE 1196 type = conflicting ? WRITE_FOLLOWS_CONFLICTING_WRITE
1197 : WRITE_FOLLOWS_NON_CONFLICTING_WRITE; 1197 : WRITE_FOLLOWS_NON_CONFLICTING_WRITE;
1198 } 1198 }
1199 } 1199 }
1200 UMA_HISTOGRAM_ENUMERATION( 1200 UMA_HISTOGRAM_ENUMERATION(
1201 "SimpleCache.WriteDependencyType", type, WRITE_DEPENDENCY_TYPE_MAX); 1201 "SimpleCache.WriteDependencyType", type, WRITE_DEPENDENCY_TYPE_MAX);
1202 } 1202 }
1203 1203
1204 } // namespace disk_cache 1204 } // namespace disk_cache
OLDNEW
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698