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

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

Issue 623213004: replace OVERRIDE and FINAL with override and final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo unwanted change in comment Created 6 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
« no previous file with comments | « net/disk_cache/memory/mem_backend_impl.h ('k') | net/disk_cache/memory/mem_entry_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) 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/memory/mem_backend_impl.h" 5 #include "net/disk_cache/memory/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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 return net::ERR_FAILED; 181 return net::ERR_FAILED;
182 } 182 }
183 183
184 class MemBackendImpl::MemIterator : public Backend::Iterator { 184 class MemBackendImpl::MemIterator : public Backend::Iterator {
185 public: 185 public:
186 explicit MemIterator(base::WeakPtr<MemBackendImpl> backend) 186 explicit MemIterator(base::WeakPtr<MemBackendImpl> backend)
187 : backend_(backend), current_(NULL) { 187 : backend_(backend), current_(NULL) {
188 } 188 }
189 189
190 virtual int OpenNextEntry(Entry** next_entry, 190 virtual int OpenNextEntry(Entry** next_entry,
191 const CompletionCallback& callback) OVERRIDE { 191 const CompletionCallback& callback) override {
192 if (!backend_) 192 if (!backend_)
193 return net::ERR_FAILED; 193 return net::ERR_FAILED;
194 194
195 MemEntryImpl* node = backend_->rankings_.GetNext(current_); 195 MemEntryImpl* node = backend_->rankings_.GetNext(current_);
196 // We should never return a child entry so iterate until we hit a parent 196 // We should never return a child entry so iterate until we hit a parent
197 // entry. 197 // entry.
198 while (node && node->type() != MemEntryImpl::kParentEntry) 198 while (node && node->type() != MemEntryImpl::kParentEntry)
199 node = backend_->rankings_.GetNext(node); 199 node = backend_->rankings_.GetNext(node);
200 *next_entry = node; 200 *next_entry = node;
201 current_ = node; 201 current_ = node;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 if (current_size_ > max_size_) 336 if (current_size_ > max_size_)
337 TrimCache(false); 337 TrimCache(false);
338 } 338 }
339 339
340 void MemBackendImpl::SubstractStorageSize(int32 bytes) { 340 void MemBackendImpl::SubstractStorageSize(int32 bytes) {
341 current_size_ -= bytes; 341 current_size_ -= bytes;
342 DCHECK_GE(current_size_, 0); 342 DCHECK_GE(current_size_, 0);
343 } 343 }
344 344
345 } // namespace disk_cache 345 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/memory/mem_backend_impl.h ('k') | net/disk_cache/memory/mem_entry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698