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 #ifndef NET_DISK_CACHE_BLOCKFILE_STATS_H_ | 5 #ifndef NET_DISK_CACHE_BLOCKFILE_STATS_H_ |
6 #define NET_DISK_CACHE_BLOCKFILE_STATS_H_ | 6 #define NET_DISK_CACHE_BLOCKFILE_STATS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
15 #include "net/base/net_export.h" | 15 #include "net/base/net_export.h" |
16 #include "net/disk_cache/blockfile/addr.h" | 16 #include "net/disk_cache/blockfile/addr.h" |
17 | 17 |
18 namespace base { | |
19 class HistogramSamples; | |
20 } // namespace base | |
21 | |
22 namespace disk_cache { | 18 namespace disk_cache { |
23 | 19 |
24 using StatsItems = base::StringPairs; | 20 using StatsItems = base::StringPairs; |
25 | 21 |
26 // This class stores cache-specific usage information, for tunning purposes. | 22 // This class stores cache-specific usage information, for tunning purposes. |
27 class NET_EXPORT_PRIVATE Stats { | 23 class NET_EXPORT_PRIVATE Stats { |
28 public: | 24 public: |
29 static const int kDataSizesLength = 28; | 25 static const int kDataSizesLength = 28; |
30 enum Counters { | 26 enum Counters { |
31 MIN_COUNTER = 0, | 27 MIN_COUNTER = 0, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 Addr storage_addr_; | 91 Addr storage_addr_; |
96 int data_sizes_[kDataSizesLength]; | 92 int data_sizes_[kDataSizesLength]; |
97 int64_t counters_[MAX_COUNTER]; | 93 int64_t counters_[MAX_COUNTER]; |
98 | 94 |
99 DISALLOW_COPY_AND_ASSIGN(Stats); | 95 DISALLOW_COPY_AND_ASSIGN(Stats); |
100 }; | 96 }; |
101 | 97 |
102 } // namespace disk_cache | 98 } // namespace disk_cache |
103 | 99 |
104 #endif // NET_DISK_CACHE_BLOCKFILE_STATS_H_ | 100 #endif // NET_DISK_CACHE_BLOCKFILE_STATS_H_ |
OLD | NEW |