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

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

Issue 462027: Use factory to create histograms, and refcounts to track lifetimes... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | Annotate | Revision Log
« no previous file with comments | « net/disk_cache/histogram_macros.h ('k') | net/disk_cache/stats.cc » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 void Snapshot(StatsHistogram::StatsSamples* samples) const; 77 void Snapshot(StatsHistogram::StatsSamples* samples) const;
78 78
79 private: 79 private:
80 int GetStatsBucket(int32 size); 80 int GetStatsBucket(int32 size);
81 int GetRatio(Counters hit, Counters miss) const; 81 int GetRatio(Counters hit, Counters miss) const;
82 82
83 BackendImpl* backend_; 83 BackendImpl* backend_;
84 uint32 storage_addr_; 84 uint32 storage_addr_;
85 int data_sizes_[kDataSizesLength]; 85 int data_sizes_[kDataSizesLength];
86 int64 counters_[MAX_COUNTER]; 86 int64 counters_[MAX_COUNTER];
87 scoped_ptr<StatsHistogram> size_histogram_; 87 scoped_refptr<StatsHistogram> size_histogram_;
88 88
89 DISALLOW_COPY_AND_ASSIGN(Stats); 89 DISALLOW_COPY_AND_ASSIGN(Stats);
90 }; 90 };
91 91
92 } // namespace disk_cache 92 } // namespace disk_cache
93 93
94 #endif // NET_DISK_CACHE_STATS_H_ 94 #endif // NET_DISK_CACHE_STATS_H_
OLDNEW
« no previous file with comments | « net/disk_cache/histogram_macros.h ('k') | net/disk_cache/stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698