summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/metrics/histogram.cc8
-rw-r--r--net/disk_cache/stats_histogram.cc5
2 files changed, 6 insertions, 7 deletions
diff --git a/base/metrics/histogram.cc b/base/metrics/histogram.cc
index cc49f4a..bf765c2 100644
--- a/base/metrics/histogram.cc
+++ b/base/metrics/histogram.cc
@@ -86,12 +86,12 @@ scoped_refptr<Histogram> Histogram::FactoryGet(const std::string& name,
if (!StatisticsRecorder::FindHistogram(name, &histogram)) {
histogram = new Histogram(name, minimum, maximum, bucket_count);
histogram->InitializeBucketRange();
+ histogram->SetFlags(flags);
StatisticsRecorder::RegisterOrDiscardDuplicate(&histogram);
}
DCHECK_EQ(HISTOGRAM, histogram->histogram_type());
DCHECK(histogram->HasConstructorArguments(minimum, maximum, bucket_count));
- histogram->SetFlags(flags);
return histogram;
}
@@ -778,12 +778,12 @@ scoped_refptr<Histogram> LinearHistogram::FactoryGet(const std::string& name,
new LinearHistogram(name, minimum, maximum, bucket_count);
linear_histogram->InitializeBucketRange();
histogram = linear_histogram;
+ histogram->SetFlags(flags);
StatisticsRecorder::RegisterOrDiscardDuplicate(&histogram);
}
DCHECK_EQ(LINEAR_HISTOGRAM, histogram->histogram_type());
DCHECK(histogram->HasConstructorArguments(minimum, maximum, bucket_count));
- histogram->SetFlags(flags);
return histogram;
}
@@ -870,11 +870,11 @@ scoped_refptr<Histogram> BooleanHistogram::FactoryGet(const std::string& name,
BooleanHistogram* boolean_histogram = new BooleanHistogram(name);
boolean_histogram->InitializeBucketRange();
histogram = boolean_histogram;
+ histogram->SetFlags(flags);
StatisticsRecorder::RegisterOrDiscardDuplicate(&histogram);
}
DCHECK_EQ(BOOLEAN_HISTOGRAM, histogram->histogram_type());
- histogram->SetFlags(flags);
return histogram;
}
@@ -917,13 +917,13 @@ scoped_refptr<Histogram> CustomHistogram::FactoryGet(
CustomHistogram* custom_histogram = new CustomHistogram(name, ranges);
custom_histogram->InitializedCustomBucketRange(ranges);
histogram = custom_histogram;
+ histogram->SetFlags(flags);
StatisticsRecorder::RegisterOrDiscardDuplicate(&histogram);
}
DCHECK_EQ(histogram->histogram_type(), CUSTOM_HISTOGRAM);
DCHECK(histogram->HasConstructorArguments(ranges[1], ranges.back(),
ranges.size()));
- histogram->SetFlags(flags);
return histogram;
}
diff --git a/net/disk_cache/stats_histogram.cc b/net/disk_cache/stats_histogram.cc
index d859899..e9d7696 100644
--- a/net/disk_cache/stats_histogram.cc
+++ b/net/disk_cache/stats_histogram.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -36,6 +36,7 @@ scoped_refptr<StatsHistogram> StatsHistogram::StatsHistogramFactoryGet(
bucket_count);
stats_histogram->InitializeBucketRange();
histogram = stats_histogram;
+ histogram->SetFlags(kUmaTargetedHistogramFlag);
StatisticsRecorder::RegisterOrDiscardDuplicate(&histogram);
}
@@ -59,8 +60,6 @@ bool StatsHistogram::Init(const Stats* stats) {
if (stats_)
return false;
- SetFlags(kUmaTargetedHistogramFlag);
-
// We support statistics report for only one cache.
init_ = true;
stats_ = stats;