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

Unified Diff: base/metrics/persistent_histogram_allocator.cc

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/persistent_histogram_allocator.cc
diff --git a/base/metrics/persistent_histogram_allocator.cc b/base/metrics/persistent_histogram_allocator.cc
index 250b74a984fd98d4ad3ca91393b5dbe3745b42a9..a8a4507ae3680db4d1a51b0fdaaf13e233940fc8 100644
--- a/base/metrics/persistent_histogram_allocator.cc
+++ b/base/metrics/persistent_histogram_allocator.cc
@@ -640,7 +640,7 @@ std::unique_ptr<HistogramBase> PersistentHistogramAllocator::CreateHistogram(
/*make_iterable=*/false);
// Create the right type of histogram.
- std::string name(histogram_data_ptr->name);
+ const char* name = histogram_data_ptr->name;
std::unique_ptr<HistogramBase> histogram;
switch (histogram_type) {
case HISTOGRAM:

Powered by Google App Engine
This is Rietveld 408576698