summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
diff options
context:
space:
mode:
authorkaiwang@chromium.org <kaiwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-18 18:06:30 +0000
committerkaiwang@chromium.org <kaiwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-18 18:06:30 +0000
commit993ae74a7291f89a21ddf7d5436e3e89091cae0d (patch)
treed4f686676b943b046151431a09dd01aa761abda4 /net/disk_cache
parentc1f5b4143d01bcfa8a826338eebfe3503a28128e (diff)
downloadchromium_src-993ae74a7291f89a21ddf7d5436e3e89091cae0d.zip
chromium_src-993ae74a7291f89a21ddf7d5436e3e89091cae0d.tar.gz
chromium_src-993ae74a7291f89a21ddf7d5436e3e89091cae0d.tar.bz2
Change the FindHistogram interface of StatisticsRecorder
Review URL: https://chromiumcodereview.appspot.com/10802002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147269 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache')
-rw-r--r--net/disk_cache/stats_histogram.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/disk_cache/stats_histogram.cc b/net/disk_cache/stats_histogram.cc
index 22343d5..66c8e50 100644
--- a/net/disk_cache/stats_histogram.cc
+++ b/net/disk_cache/stats_histogram.cc
@@ -24,15 +24,12 @@ StatsHistogram::~StatsHistogram() {
}
StatsHistogram* StatsHistogram::FactoryGet(const std::string& name) {
- Histogram* histogram(NULL);
-
Sample minimum = 1;
Sample maximum = disk_cache::Stats::kDataSizesLength - 1;
size_t bucket_count = disk_cache::Stats::kDataSizesLength;
- if (StatisticsRecorder::FindHistogram(name, &histogram)) {
- DCHECK(histogram != NULL);
- } else {
+ Histogram* histogram = StatisticsRecorder::FindHistogram(name);
+ if (!histogram) {
// To avoid racy destruction at shutdown, the following will be leaked.
StatsHistogram* stats_histogram =
new StatsHistogram(name, minimum, maximum, bucket_count);