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

Side by Side Diff: net/disk_cache/blockfile/backend_impl.cc

Issue 1910023002: Remove partial blockfile v3 disk_cache implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « net/disk_cache/blockfile/addr_unittest.cc ('k') | net/disk_cache/blockfile/backend_impl_v3.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/blockfile/backend_impl.h" 5 #include "net/disk_cache/blockfile/backend_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after
1534 if (it != open_entries_.end()) { 1534 if (it != open_entries_.end()) {
1535 // Easy job. This entry is already in memory. 1535 // Easy job. This entry is already in memory.
1536 EntryImpl* this_entry = it->second; 1536 EntryImpl* this_entry = it->second;
1537 this_entry->AddRef(); 1537 this_entry->AddRef();
1538 *entry = this_entry; 1538 *entry = this_entry;
1539 return 0; 1539 return 0;
1540 } 1540 }
1541 1541
1542 STRESS_DCHECK(block_files_.IsValid(address)); 1542 STRESS_DCHECK(block_files_.IsValid(address));
1543 1543
1544 if (!address.SanityCheckForEntryV2()) { 1544 if (!address.SanityCheckForEntry()) {
1545 LOG(WARNING) << "Wrong entry address."; 1545 LOG(WARNING) << "Wrong entry address.";
1546 STRESS_NOTREACHED(); 1546 STRESS_NOTREACHED();
1547 return ERR_INVALID_ADDRESS; 1547 return ERR_INVALID_ADDRESS;
1548 } 1548 }
1549 1549
1550 scoped_refptr<EntryImpl> cache_entry( 1550 scoped_refptr<EntryImpl> cache_entry(
1551 new EntryImpl(this, address, read_only_)); 1551 new EntryImpl(this, address, read_only_));
1552 IncreaseNumRefs(); 1552 IncreaseNumRefs();
1553 *entry = NULL; 1553 *entry = NULL;
1554 1554
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 if (total_memory > kMaxBuffersSize || total_memory <= 0) 2110 if (total_memory > kMaxBuffersSize || total_memory <= 0)
2111 total_memory = kMaxBuffersSize; 2111 total_memory = kMaxBuffersSize;
2112 2112
2113 done = true; 2113 done = true;
2114 } 2114 }
2115 2115
2116 return static_cast<int>(total_memory); 2116 return static_cast<int>(total_memory);
2117 } 2117 }
2118 2118
2119 } // namespace disk_cache 2119 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/blockfile/addr_unittest.cc ('k') | net/disk_cache/blockfile/backend_impl_v3.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698