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/blockfile/backend_impl.h" | 5 #include "net/disk_cache/blockfile/backend_impl.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/files/file.h" | 12 #include "base/files/file.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
15 #include "base/hash.h" | 15 #include "base/hash.h" |
16 #include "base/location.h" | 16 #include "base/location.h" |
17 #include "base/metrics/field_trial.h" | 17 #include "base/metrics/field_trial.h" |
18 #include "base/metrics/histogram.h" | 18 #include "base/metrics/histogram.h" |
19 #include "base/rand_util.h" | 19 #include "base/rand_util.h" |
20 #include "base/single_thread_task_runner.h" | 20 #include "base/single_thread_task_runner.h" |
21 #include "base/strings/string_number_conversions.h" | 21 #include "base/strings/string_number_conversions.h" |
22 #include "base/strings/string_util.h" | 22 #include "base/strings/string_util.h" |
23 #include "base/strings/stringprintf.h" | 23 #include "base/strings/stringprintf.h" |
24 #include "base/sys_info.h" | 24 #include "base/sys_info.h" |
25 #include "base/thread_task_runner_handle.h" | |
26 #include "base/threading/thread_restrictions.h" | 25 #include "base/threading/thread_restrictions.h" |
| 26 #include "base/threading/thread_task_runner_handle.h" |
27 #include "base/time/time.h" | 27 #include "base/time/time.h" |
28 #include "base/timer/timer.h" | 28 #include "base/timer/timer.h" |
29 #include "net/base/net_errors.h" | 29 #include "net/base/net_errors.h" |
30 #include "net/disk_cache/blockfile/disk_format.h" | 30 #include "net/disk_cache/blockfile/disk_format.h" |
31 #include "net/disk_cache/blockfile/entry_impl.h" | 31 #include "net/disk_cache/blockfile/entry_impl.h" |
32 #include "net/disk_cache/blockfile/errors.h" | 32 #include "net/disk_cache/blockfile/errors.h" |
33 #include "net/disk_cache/blockfile/experiments.h" | 33 #include "net/disk_cache/blockfile/experiments.h" |
34 #include "net/disk_cache/blockfile/file.h" | 34 #include "net/disk_cache/blockfile/file.h" |
35 #include "net/disk_cache/blockfile/histogram_macros.h" | 35 #include "net/disk_cache/blockfile/histogram_macros.h" |
36 #include "net/disk_cache/blockfile/webfonts_histogram.h" | 36 #include "net/disk_cache/blockfile/webfonts_histogram.h" |
(...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2110 if (total_memory > kMaxBuffersSize || total_memory <= 0) | 2110 if (total_memory > kMaxBuffersSize || total_memory <= 0) |
2111 total_memory = kMaxBuffersSize; | 2111 total_memory = kMaxBuffersSize; |
2112 | 2112 |
2113 done = true; | 2113 done = true; |
2114 } | 2114 } |
2115 | 2115 |
2116 return static_cast<int>(total_memory); | 2116 return static_cast<int>(total_memory); |
2117 } | 2117 } |
2118 | 2118 |
2119 } // namespace disk_cache | 2119 } // namespace disk_cache |
OLD | NEW |