| Index: base/metrics/histogram.cc
|
| ===================================================================
|
| --- base/metrics/histogram.cc (revision 150475)
|
| +++ base/metrics/histogram.cc (working copy)
|
| @@ -133,7 +133,7 @@
|
| Sample minimum,
|
| Sample maximum,
|
| size_t bucket_count,
|
| - Flags flags) {
|
| + int32 flags) {
|
| bool valid_arguments =
|
| InspectConstructionArguments(name, &minimum, &maximum, &bucket_count);
|
| DCHECK(valid_arguments);
|
| @@ -162,7 +162,7 @@
|
| TimeDelta minimum,
|
| TimeDelta maximum,
|
| size_t bucket_count,
|
| - Flags flags) {
|
| + int32 flags) {
|
| return FactoryGet(name, minimum.InMilliseconds(), maximum.InMilliseconds(),
|
| bucket_count, flags);
|
| }
|
| @@ -442,7 +442,6 @@
|
| declared_min_(minimum),
|
| declared_max_(maximum),
|
| bucket_count_(bucket_count),
|
| - flags_(kNoFlags),
|
| sample_(bucket_count) {}
|
|
|
| Histogram::~Histogram() {
|
| @@ -531,7 +530,7 @@
|
|
|
| const string Histogram::GetAsciiBucketRange(size_t i) const {
|
| string result;
|
| - if (kHexRangePrintingFlag & flags_)
|
| + if (kHexRangePrintingFlag & flags())
|
| StringAppendF(&result, "%#x", ranges(i));
|
| else
|
| StringAppendF(&result, "%d", ranges(i));
|
| @@ -636,8 +635,8 @@
|
|
|
| StringAppendF(output, ", average = %.1f", average);
|
| }
|
| - if (flags_ & ~kHexRangePrintingFlag)
|
| - StringAppendF(output, " (flags = 0x%x)", flags_ & ~kHexRangePrintingFlag);
|
| + if (flags() & ~kHexRangePrintingFlag)
|
| + StringAppendF(output, " (flags = 0x%x)", flags() & ~kHexRangePrintingFlag);
|
| }
|
|
|
| void Histogram::WriteAsciiBucketContext(const int64 past,
|
| @@ -685,7 +684,7 @@
|
| Sample minimum,
|
| Sample maximum,
|
| size_t bucket_count,
|
| - Flags flags) {
|
| + int32 flags) {
|
| bool valid_arguments = Histogram::InspectConstructionArguments(
|
| name, &minimum, &maximum, &bucket_count);
|
| DCHECK(valid_arguments);
|
| @@ -715,7 +714,7 @@
|
| TimeDelta minimum,
|
| TimeDelta maximum,
|
| size_t bucket_count,
|
| - Flags flags) {
|
| + int32 flags) {
|
| return FactoryGet(name, minimum.InMilliseconds(), maximum.InMilliseconds(),
|
| bucket_count, flags);
|
| }
|
| @@ -781,7 +780,7 @@
|
| // This section provides implementation for BooleanHistogram.
|
| //------------------------------------------------------------------------------
|
|
|
| -Histogram* BooleanHistogram::FactoryGet(const string& name, Flags flags) {
|
| +Histogram* BooleanHistogram::FactoryGet(const string& name, int32 flags) {
|
| Histogram* histogram = StatisticsRecorder::FindHistogram(name);
|
| if (!histogram) {
|
| // To avoid racy destruction at shutdown, the following will be leaked.
|
| @@ -819,7 +818,7 @@
|
|
|
| Histogram* CustomHistogram::FactoryGet(const string& name,
|
| const vector<Sample>& custom_ranges,
|
| - Flags flags) {
|
| + int32 flags) {
|
| CHECK(ValidateCustomRanges(custom_ranges));
|
|
|
| Histogram* histogram = StatisticsRecorder::FindHistogram(name);
|
|
|