| Index: base/metrics/sparse_histogram.cc
|
| diff --git a/base/metrics/sparse_histogram.cc b/base/metrics/sparse_histogram.cc
|
| index e9bacd1ab2af62c8a472a217aac56ca6fdf1470c..9063b85df910979454784dc1d042bbd8ae426fd9 100644
|
| --- a/base/metrics/sparse_histogram.cc
|
| +++ b/base/metrics/sparse_histogram.cc
|
| @@ -45,7 +45,7 @@ HistogramBase* SparseHistogram::FactoryGet(const std::string& name,
|
| DCHECK(!histogram_ref); // Should never have been set.
|
| DCHECK(!allocator); // Shouldn't have failed.
|
| flags &= ~HistogramBase::kIsPersistent;
|
| - tentative_histogram.reset(new SparseHistogram(name));
|
| + tentative_histogram.reset(new SparseHistogram(GetPermanentName(name)));
|
| tentative_histogram->SetFlags(flags);
|
| }
|
|
|
| @@ -75,7 +75,7 @@ HistogramBase* SparseHistogram::FactoryGet(const std::string& name,
|
| // static
|
| std::unique_ptr<HistogramBase> SparseHistogram::PersistentCreate(
|
| PersistentHistogramAllocator* allocator,
|
| - const std::string& name,
|
| + const char* name,
|
| HistogramSamples::Metadata* meta,
|
| HistogramSamples::Metadata* logged_meta) {
|
| return WrapUnique(
|
| @@ -173,13 +173,13 @@ bool SparseHistogram::SerializeInfoImpl(Pickle* pickle) const {
|
| return pickle->WriteString(histogram_name()) && pickle->WriteInt(flags());
|
| }
|
|
|
| -SparseHistogram::SparseHistogram(const std::string& name)
|
| +SparseHistogram::SparseHistogram(const char* name)
|
| : HistogramBase(name),
|
| unlogged_samples_(new SampleMap(HashMetricName(name))),
|
| logged_samples_(new SampleMap(unlogged_samples_->id())) {}
|
|
|
| SparseHistogram::SparseHistogram(PersistentHistogramAllocator* allocator,
|
| - const std::string& name,
|
| + const char* name,
|
| HistogramSamples::Metadata* meta,
|
| HistogramSamples::Metadata* logged_meta)
|
| : HistogramBase(name),
|
| @@ -277,9 +277,7 @@ void SparseHistogram::WriteAsciiImpl(bool graph_it,
|
|
|
| void SparseHistogram::WriteAsciiHeader(const Count total_count,
|
| std::string* output) const {
|
| - StringAppendF(output,
|
| - "Histogram: %s recorded %d samples",
|
| - histogram_name().c_str(),
|
| + StringAppendF(output, "Histogram: %s recorded %d samples", histogram_name(),
|
| total_count);
|
| if (flags())
|
| StringAppendF(output, " (flags = 0x%x)", flags());
|
|
|