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

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

Issue 8792006: base::Bind: Convert chrome_benchmarking_message_filter.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix. Created 9 years 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_backend_impl.h ('k') | net/http/mock_http_cache.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_backend_impl.h" 5 #include "net/disk_cache/mem_backend_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/sys_info.h" 8 #include "base/sys_info.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/disk_cache/cache_util.h" 10 #include "net/disk_cache/cache_util.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 } 209 }
210 210
211 int MemBackendImpl::OpenNextEntry(void** iter, Entry** next_entry, 211 int MemBackendImpl::OpenNextEntry(void** iter, Entry** next_entry,
212 OldCompletionCallback* callback) { 212 OldCompletionCallback* callback) {
213 if (OpenNextEntry(iter, next_entry)) 213 if (OpenNextEntry(iter, next_entry))
214 return net::OK; 214 return net::OK;
215 215
216 return net::ERR_FAILED; 216 return net::ERR_FAILED;
217 } 217 }
218 218
219 int MemBackendImpl::OpenNextEntry(void** iter, Entry** next_entry,
220 const net::CompletionCallback& callback) {
221 if (OpenNextEntry(iter, next_entry))
222 return net::OK;
223
224 return net::ERR_FAILED;
225 }
226
219 void MemBackendImpl::EndEnumeration(void** iter) { 227 void MemBackendImpl::EndEnumeration(void** iter) {
220 *iter = NULL; 228 *iter = NULL;
221 } 229 }
222 230
223 void MemBackendImpl::OnExternalCacheHit(const std::string& key) { 231 void MemBackendImpl::OnExternalCacheHit(const std::string& key) {
224 EntryMap::iterator it = entries_.find(key); 232 EntryMap::iterator it = entries_.find(key);
225 if (it != entries_.end()) { 233 if (it != entries_.end()) {
226 UpdateRank(it->second); 234 UpdateRank(it->second);
227 } 235 }
228 } 236 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 if (current_size_ > max_size_) 358 if (current_size_ > max_size_)
351 TrimCache(false); 359 TrimCache(false);
352 } 360 }
353 361
354 void MemBackendImpl::SubstractStorageSize(int32 bytes) { 362 void MemBackendImpl::SubstractStorageSize(int32 bytes) {
355 current_size_ -= bytes; 363 current_size_ -= bytes;
356 DCHECK_GE(current_size_, 0); 364 DCHECK_GE(current_size_, 0);
357 } 365 }
358 366
359 } // namespace disk_cache 367 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/mem_backend_impl.h ('k') | net/http/mock_http_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698