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

Unified Diff: base/metrics/sample_map.cc

Issue 2973603002: Remove typically unused local_metadata_ field. (Closed)
Patch Set: 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
« no previous file with comments | « base/metrics/histogram_samples.cc ('k') | base/metrics/sample_vector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/sample_map.cc
diff --git a/base/metrics/sample_map.cc b/base/metrics/sample_map.cc
index f0e4e5edb15b089394dfa95fe57ce106ca9d5266..08fe032057702df2f4f500f836891a843a8a007a 100644
--- a/base/metrics/sample_map.cc
+++ b/base/metrics/sample_map.cc
@@ -79,9 +79,11 @@ void SampleMapIterator::SkipEmptyBuckets() {
SampleMap::SampleMap() : SampleMap(0) {}
-SampleMap::SampleMap(uint64_t id) : HistogramSamples(id) {}
+SampleMap::SampleMap(uint64_t id) : HistogramSamples(id, new LocalMetadata()) {}
-SampleMap::~SampleMap() {}
+SampleMap::~SampleMap() {
+ delete static_cast<LocalMetadata*>(meta());
+}
void SampleMap::Accumulate(Sample value, Count count) {
sample_counts_[value] += count;
« no previous file with comments | « base/metrics/histogram_samples.cc ('k') | base/metrics/sample_vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698