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/rankings.h" | 5 #include "net/disk_cache/blockfile/rankings.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "net/base/net_export.h" |
12 #include "net/disk_cache/blockfile/backend_impl.h" | 13 #include "net/disk_cache/blockfile/backend_impl.h" |
13 #include "net/disk_cache/blockfile/disk_format.h" | 14 #include "net/disk_cache/blockfile/disk_format.h" |
14 #include "net/disk_cache/blockfile/entry_impl.h" | 15 #include "net/disk_cache/blockfile/entry_impl.h" |
15 #include "net/disk_cache/blockfile/errors.h" | 16 #include "net/disk_cache/blockfile/errors.h" |
16 #include "net/disk_cache/blockfile/histogram_macros.h" | 17 #include "net/disk_cache/blockfile/histogram_macros.h" |
17 #include "net/disk_cache/blockfile/stress_support.h" | 18 #include "net/disk_cache/blockfile/stress_support.h" |
18 | 19 |
19 // Provide a BackendImpl object to macros from histogram_macros.h. | 20 // Provide a BackendImpl object to macros from histogram_macros.h. |
20 #define CACHE_UMA_BACKEND_IMPL_OBJ backend_ | 21 #define CACHE_UMA_BACKEND_IMPL_OBJ backend_ |
21 | 22 |
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 void Rankings::DecrementCounter(List list) { | 921 void Rankings::DecrementCounter(List list) { |
921 if (!count_lists_) | 922 if (!count_lists_) |
922 return; | 923 return; |
923 | 924 |
924 DCHECK(control_data_->sizes[list] > 0); | 925 DCHECK(control_data_->sizes[list] > 0); |
925 if (control_data_->sizes[list] > 0) | 926 if (control_data_->sizes[list] > 0) |
926 control_data_->sizes[list]--; | 927 control_data_->sizes[list]--; |
927 } | 928 } |
928 | 929 |
929 } // namespace disk_cache | 930 } // namespace disk_cache |
OLD | NEW |