| Index: base/metrics/histogram.cc
|
| diff --git a/base/metrics/histogram.cc b/base/metrics/histogram.cc
|
| index 1bbcab7023a8be9e45e3ca72fb631abee31ef4a6..083856bf87618379a964eb2095aa6cae4d7039c1 100644
|
| --- a/base/metrics/histogram.cc
|
| +++ b/base/metrics/histogram.cc
|
| @@ -18,6 +18,7 @@
|
| #include "base/debug/alias.h"
|
| #include "base/logging.h"
|
| #include "base/metrics/histogram_macros.h"
|
| +#include "base/metrics/metrics_hashes.h"
|
| #include "base/metrics/sample_vector.h"
|
| #include "base/metrics/statistics_recorder.h"
|
| #include "base/pickle.h"
|
| @@ -259,6 +260,10 @@ bool Histogram::InspectConstructionArguments(const std::string& name,
|
| return true;
|
| }
|
|
|
| +uint64_t Histogram::name_hash() const {
|
| + return samples_->id();
|
| +}
|
| +
|
| HistogramType Histogram::GetHistogramType() const {
|
| return HISTOGRAM;
|
| }
|
| @@ -335,7 +340,7 @@ Histogram::Histogram(const std::string& name,
|
| declared_min_(minimum),
|
| declared_max_(maximum) {
|
| if (ranges)
|
| - samples_.reset(new SampleVector(ranges));
|
| + samples_.reset(new SampleVector(HashMetricName(name), ranges));
|
| }
|
|
|
| Histogram::~Histogram() {
|
| @@ -392,7 +397,8 @@ HistogramBase* Histogram::DeserializeInfoImpl(PickleIterator* iter) {
|
| }
|
|
|
| scoped_ptr<SampleVector> Histogram::SnapshotSampleVector() const {
|
| - scoped_ptr<SampleVector> samples(new SampleVector(bucket_ranges()));
|
| + scoped_ptr<SampleVector> samples(
|
| + new SampleVector(samples_->id(), bucket_ranges()));
|
| samples->Add(*samples_);
|
| return samples;
|
| }
|
|
|