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

Unified Diff: base/metrics/sample_vector.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/sample_vector.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/sample_vector.cc
diff --git a/base/metrics/sample_vector.cc b/base/metrics/sample_vector.cc
index 5306c3e4a0261355215ae42c8d749545da785c80..98214f2509fe029ced584eb4c5c2f613399cec6f 100644
--- a/base/metrics/sample_vector.cc
+++ b/base/metrics/sample_vector.cc
@@ -24,12 +24,6 @@ typedef HistogramBase::Count Count;
typedef HistogramBase::Sample Sample;
SampleVectorBase::SampleVectorBase(uint64_t id,
- const BucketRanges* bucket_ranges)
- : HistogramSamples(id), bucket_ranges_(bucket_ranges) {
- CHECK_GE(bucket_ranges_->bucket_count(), 1u);
-}
-
-SampleVectorBase::SampleVectorBase(uint64_t id,
Metadata* meta,
const BucketRanges* bucket_ranges)
: HistogramSamples(id, meta), bucket_ranges_(bucket_ranges) {
@@ -286,9 +280,11 @@ SampleVector::SampleVector(const BucketRanges* bucket_ranges)
: SampleVector(0, bucket_ranges) {}
SampleVector::SampleVector(uint64_t id, const BucketRanges* bucket_ranges)
- : SampleVectorBase(id, bucket_ranges) {}
+ : SampleVectorBase(id, new LocalMetadata(), bucket_ranges) {}
-SampleVector::~SampleVector() {}
+SampleVector::~SampleVector() {
+ delete static_cast<LocalMetadata*>(meta());
+}
bool SampleVector::MountExistingCountsStorage() const {
// There is never any existing storage other than what is already in use.
« no previous file with comments | « base/metrics/sample_vector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698