| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/sys_info.h" | 8 #include "base/sys_info.h" |
| 8 #include "net/disk_cache/cache_util.h" | 9 #include "net/disk_cache/cache_util.h" |
| 9 #include "net/disk_cache/mem_entry_impl.h" | 10 #include "net/disk_cache/mem_entry_impl.h" |
| 10 | 11 |
| 11 using base::Time; | 12 using base::Time; |
| 12 | 13 |
| 13 namespace { | 14 namespace { |
| 14 | 15 |
| 15 const int kDefaultCacheSize = 10 * 1024 * 1024; | 16 const int kDefaultCacheSize = 10 * 1024 * 1024; |
| 16 const int kCleanUpMargin = 1024 * 1024; | 17 const int kCleanUpMargin = 1024 * 1024; |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 246 |
| 246 void MemBackendImpl::UpdateRank(MemEntryImpl* node) { | 247 void MemBackendImpl::UpdateRank(MemEntryImpl* node) { |
| 247 rankings_.UpdateRank(node); | 248 rankings_.UpdateRank(node); |
| 248 } | 249 } |
| 249 | 250 |
| 250 int MemBackendImpl::MaxFileSize() const { | 251 int MemBackendImpl::MaxFileSize() const { |
| 251 return max_size_ / 8; | 252 return max_size_ / 8; |
| 252 } | 253 } |
| 253 | 254 |
| 254 } // namespace disk_cache | 255 } // namespace disk_cache |
| OLD | NEW |