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

Unified Diff: base/metrics/histogram_snapshot_manager.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/histogram_snapshot_manager.cc
diff --git a/base/metrics/histogram_snapshot_manager.cc b/base/metrics/histogram_snapshot_manager.cc
index 89d4f8ef6fe32a1cae712ff524601b52e6c11d3e..fc8bead72b89f0a24dcb615fc5c2fb0488328989 100644
--- a/base/metrics/histogram_snapshot_manager.cc
+++ b/base/metrics/histogram_snapshot_manager.cc
@@ -81,7 +81,7 @@ void HistogramSnapshotManager::PrepareSamples(
HistogramBase::Sample* ranges_ptr = &ranges_copy[0];
uint32_t ranges_checksum = ranges->checksum();
uint32_t ranges_calc_checksum = ranges->CalculateChecksum();
- const char* histogram_name = histogram->histogram_name().c_str();
+ const char* histogram_name = histogram->histogram_name();
int32_t flags = histogram->flags();
// The checksum should have caught this, so crash separately if it didn't.
CHECK_NE(0U, HistogramBase::RANGE_CHECKSUM_ERROR & corruption);

Powered by Google App Engine
This is Rietveld 408576698