| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef NET_DISK_CACHE_STATS_H_ | 5 #ifndef NET_DISK_CACHE_STATS_H_ |
| 6 #define NET_DISK_CACHE_STATS_H_ | 6 #define NET_DISK_CACHE_STATS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 void Snapshot(StatsHistogram::StatsSamples* samples) const; | 79 void Snapshot(StatsHistogram::StatsSamples* samples) const; |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 int GetStatsBucket(int32 size); | 82 int GetStatsBucket(int32 size); |
| 83 int GetRatio(Counters hit, Counters miss) const; | 83 int GetRatio(Counters hit, Counters miss) const; |
| 84 | 84 |
| 85 BackendImpl* backend_; | 85 BackendImpl* backend_; |
| 86 uint32 storage_addr_; | 86 uint32 storage_addr_; |
| 87 int data_sizes_[kDataSizesLength]; | 87 int data_sizes_[kDataSizesLength]; |
| 88 int64 counters_[MAX_COUNTER]; | 88 int64 counters_[MAX_COUNTER]; |
| 89 scoped_refptr<StatsHistogram> size_histogram_; | 89 StatsHistogram* size_histogram_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(Stats); | 91 DISALLOW_COPY_AND_ASSIGN(Stats); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace disk_cache | 94 } // namespace disk_cache |
| 95 | 95 |
| 96 #endif // NET_DISK_CACHE_STATS_H_ | 96 #endif // NET_DISK_CACHE_STATS_H_ |
| OLD | NEW |