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

Unified Diff: base/metrics/persistent_histogram_allocator.cc

Issue 2034813003: Make changing a record's type an atomic operation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | base/metrics/persistent_memory_allocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/persistent_histogram_allocator.cc
diff --git a/base/metrics/persistent_histogram_allocator.cc b/base/metrics/persistent_histogram_allocator.cc
index 20f64336016ae7acf269c3faa25ba3e8fc585425..789e969d7a687c2695915712422350a742758dee 100644
--- a/base/metrics/persistent_histogram_allocator.cc
+++ b/base/metrics/persistent_histogram_allocator.cc
@@ -480,7 +480,7 @@ void PersistentHistogramAllocator::FinalizeHistogram(Reference ref,
// two to be created. The allocator does not support releasing the
// acquired memory so just change the type to be empty.
else
- memory_allocator_->SetType(ref, 0);
+ memory_allocator_->ChangeType(ref, 0, kTypeIdHistogram);
}
PersistentSampleMapRecords* PersistentHistogramAllocator::UseSampleMapRecords(
« no previous file with comments | « no previous file | base/metrics/persistent_memory_allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698