Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: net/disk_cache/blockfile/stats.h

Issue 1062803009: Use of base::StringPairs appropriately in stats.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated review comments. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 8 #include <string>
9 #include <vector>
10 9
11 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/strings/string_split.h"
12 #include "net/base/net_export.h" 12 #include "net/base/net_export.h"
13 #include "net/disk_cache/blockfile/addr.h" 13 #include "net/disk_cache/blockfile/addr.h"
14 14
15 namespace base { 15 namespace base {
16 class HistogramSamples; 16 class HistogramSamples;
17 } // namespace base 17 } // namespace base
18 18
19 namespace disk_cache { 19 namespace disk_cache {
20 20
21 typedef std::vector<std::pair<std::string, std::string> > StatsItems; 21 using StatsItems = base::StringPairs;
22 22
23 // This class stores cache-specific usage information, for tunning purposes. 23 // This class stores cache-specific usage information, for tunning purposes.
24 class NET_EXPORT_PRIVATE Stats { 24 class NET_EXPORT_PRIVATE Stats {
25 public: 25 public:
26 static const int kDataSizesLength = 28; 26 static const int kDataSizesLength = 28;
27 enum Counters { 27 enum Counters {
28 MIN_COUNTER = 0, 28 MIN_COUNTER = 0,
29 OPEN_MISS = MIN_COUNTER, 29 OPEN_MISS = MIN_COUNTER,
30 OPEN_HIT, 30 OPEN_HIT,
31 CREATE_MISS, 31 CREATE_MISS,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 Addr storage_addr_; 92 Addr storage_addr_;
93 int data_sizes_[kDataSizesLength]; 93 int data_sizes_[kDataSizesLength];
94 int64 counters_[MAX_COUNTER]; 94 int64 counters_[MAX_COUNTER];
95 95
96 DISALLOW_COPY_AND_ASSIGN(Stats); 96 DISALLOW_COPY_AND_ASSIGN(Stats);
97 }; 97 };
98 98
99 } // namespace disk_cache 99 } // namespace disk_cache
100 100
101 #endif // NET_DISK_CACHE_BLOCKFILE_STATS_H_ 101 #endif // NET_DISK_CACHE_BLOCKFILE_STATS_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698