OLD | NEW |
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/backend_impl.h" | 5 #include "net/disk_cache/blockfile/backend_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/hash.h" | 11 #include "base/hash.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/metrics/field_trial.h" | 13 #include "base/metrics/field_trial.h" |
14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
15 #include "base/metrics/stats_counters.h" | 15 #include "base/metrics/stats_counters.h" |
16 #include "base/rand_util.h" | 16 #include "base/rand_util.h" |
17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
19 #include "base/sys_info.h" | 19 #include "base/sys_info.h" |
20 #include "base/threading/thread_restrictions.h" | 20 #include "base/threading/thread_restrictions.h" |
21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
22 #include "base/timer/timer.h" | 22 #include "base/timer/timer.h" |
23 #include "net/base/net_errors.h" | 23 #include "net/base/net_errors.h" |
| 24 #include "net/disk_cache/blockfile/disk_format.h" |
| 25 #include "net/disk_cache/blockfile/entry_impl.h" |
| 26 #include "net/disk_cache/blockfile/errors.h" |
| 27 #include "net/disk_cache/blockfile/experiments.h" |
| 28 #include "net/disk_cache/blockfile/file.h" |
| 29 #include "net/disk_cache/blockfile/histogram_macros.h" |
24 #include "net/disk_cache/cache_util.h" | 30 #include "net/disk_cache/cache_util.h" |
25 #include "net/disk_cache/disk_format.h" | |
26 #include "net/disk_cache/entry_impl.h" | |
27 #include "net/disk_cache/errors.h" | |
28 #include "net/disk_cache/experiments.h" | |
29 #include "net/disk_cache/file.h" | |
30 #include "net/disk_cache/histogram_macros.h" | |
31 | 31 |
32 // Provide a BackendImpl object to macros from histogram_macros.h. | 32 // Provide a BackendImpl object to macros from histogram_macros.h. |
33 #define CACHE_UMA_BACKEND_IMPL_OBJ this | 33 #define CACHE_UMA_BACKEND_IMPL_OBJ this |
34 | 34 |
35 using base::Time; | 35 using base::Time; |
36 using base::TimeDelta; | 36 using base::TimeDelta; |
37 using base::TimeTicks; | 37 using base::TimeTicks; |
38 | 38 |
39 namespace { | 39 namespace { |
40 | 40 |
(...skipping 2050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2091 if (total_memory > kMaxBuffersSize || total_memory <= 0) | 2091 if (total_memory > kMaxBuffersSize || total_memory <= 0) |
2092 total_memory = kMaxBuffersSize; | 2092 total_memory = kMaxBuffersSize; |
2093 | 2093 |
2094 done = true; | 2094 done = true; |
2095 } | 2095 } |
2096 | 2096 |
2097 return static_cast<int>(total_memory); | 2097 return static_cast<int>(total_memory); |
2098 } | 2098 } |
2099 | 2099 |
2100 } // namespace disk_cache | 2100 } // namespace disk_cache |
OLD | NEW |