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

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

Issue 121643003: Reorganize net/disk_cache into backend specific directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ios breakage Created 6 years, 9 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/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/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"
11 #include "net/disk_cache/mem_entry_impl.h" 11 #include "net/disk_cache/memory/mem_entry_impl.h"
12 12
13 using base::Time; 13 using base::Time;
14 14
15 namespace { 15 namespace {
16 16
17 const int kDefaultInMemoryCacheSize = 10 * 1024 * 1024; 17 const int kDefaultInMemoryCacheSize = 10 * 1024 * 1024;
18 const int kCleanUpMargin = 1024 * 1024; 18 const int kCleanUpMargin = 1024 * 1024;
19 19
20 int LowWaterAdjust(int high_water) { 20 int LowWaterAdjust(int high_water) {
21 if (high_water < kCleanUpMargin) 21 if (high_water < kCleanUpMargin)
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 if (current_size_ > max_size_) 328 if (current_size_ > max_size_)
329 TrimCache(false); 329 TrimCache(false);
330 } 330 }
331 331
332 void MemBackendImpl::SubstractStorageSize(int32 bytes) { 332 void MemBackendImpl::SubstractStorageSize(int32 bytes) {
333 current_size_ -= bytes; 333 current_size_ -= bytes;
334 DCHECK_GE(current_size_, 0); 334 DCHECK_GE(current_size_, 0);
335 } 335 }
336 336
337 } // namespace disk_cache 337 } // 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