Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(551)

Unified Diff: base/metrics/sparse_histogram.h

Issue 2973863002: Remove std::string histogram name from HistogramBase object.
Patch Set: never rely on outside string permanence Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/metrics/sparse_histogram.h
diff --git a/base/metrics/sparse_histogram.h b/base/metrics/sparse_histogram.h
index 66e9825918d967f7298e6d82eb18992fdfae660f..851b6f629b91dd12cb091443de54c24f63d34b76 100644
--- a/base/metrics/sparse_histogram.h
+++ b/base/metrics/sparse_histogram.h
@@ -35,7 +35,7 @@ class BASE_EXPORT SparseHistogram : public HistogramBase {
// live longer than the created sparse histogram.
static std::unique_ptr<HistogramBase> PersistentCreate(
PersistentHistogramAllocator* allocator,
- const std::string& name,
+ const char* name,
HistogramSamples::Metadata* meta,
HistogramSamples::Metadata* logged_meta);
@@ -63,10 +63,10 @@ class BASE_EXPORT SparseHistogram : public HistogramBase {
private:
// Clients should always use FactoryGet to create SparseHistogram.
- explicit SparseHistogram(const std::string& name);
+ explicit SparseHistogram(const char* name);
SparseHistogram(PersistentHistogramAllocator* allocator,
- const std::string& name,
+ const char* name,
HistogramSamples::Metadata* meta,
HistogramSamples::Metadata* logged_meta);

Powered by Google App Engine
This is Rietveld 408576698