| 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/rankings.h" | 5 #include "net/disk_cache/rankings.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "net/disk_cache/backend_impl.h" | 8 #include "net/disk_cache/backend_impl.h" |
| 9 #include "net/disk_cache/disk_format.h" | 9 #include "net/disk_cache/disk_format.h" |
| 10 #include "net/disk_cache/entry_impl.h" | 10 #include "net/disk_cache/entry_impl.h" |
| 11 #include "net/disk_cache/errors.h" | 11 #include "net/disk_cache/errors.h" |
| 12 #include "net/disk_cache/histogram_macros.h" | 12 #include "net/disk_cache/histogram_macros.h" |
| 13 #include "net/disk_cache/stress_support.h" | 13 #include "net/disk_cache/stress_support.h" |
| 14 | 14 |
| 15 // Provide a BackendImpl object to macros from histogram_macros.h. |
| 16 #define CACHE_UMA_BACKEND_IMPL_OBJ backend_ |
| 17 |
| 15 using base::Time; | 18 using base::Time; |
| 16 using base::TimeTicks; | 19 using base::TimeTicks; |
| 17 | 20 |
| 18 namespace disk_cache { | 21 namespace disk_cache { |
| 19 // This is used by crash_cache.exe to generate unit test files. | 22 // This is used by crash_cache.exe to generate unit test files. |
| 20 NET_EXPORT_PRIVATE RankCrashes g_rankings_crash = NO_CRASH; | 23 NET_EXPORT_PRIVATE RankCrashes g_rankings_crash = NO_CRASH; |
| 21 } | 24 } |
| 22 | 25 |
| 23 namespace { | 26 namespace { |
| 24 | 27 |
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 void Rankings::DecrementCounter(List list) { | 916 void Rankings::DecrementCounter(List list) { |
| 914 if (!count_lists_) | 917 if (!count_lists_) |
| 915 return; | 918 return; |
| 916 | 919 |
| 917 DCHECK(control_data_->sizes[list] > 0); | 920 DCHECK(control_data_->sizes[list] > 0); |
| 918 if (control_data_->sizes[list] > 0) | 921 if (control_data_->sizes[list] > 0) |
| 919 control_data_->sizes[list]--; | 922 control_data_->sizes[list]--; |
| 920 } | 923 } |
| 921 | 924 |
| 922 } // namespace disk_cache | 925 } // namespace disk_cache |
| OLD | NEW |