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

Unified Diff: base/metrics/statistics_recorder.h

Issue 1537743006: Persist setup metrics and have Chrome report them during UMA upload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shared-histograms
Patch Set: test needs to clear out statistics-recorder before releasing histogram memory Created 4 years, 10 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/statistics_recorder.h
diff --git a/base/metrics/statistics_recorder.h b/base/metrics/statistics_recorder.h
index 32f381bd717ba82b5a66b995e7beda326f42e402..9033419e5a9a809f82cdde666c31836db870d611 100644
--- a/base/metrics/statistics_recorder.h
+++ b/base/metrics/statistics_recorder.h
@@ -133,6 +133,11 @@ class BASE_EXPORT StatisticsRecorder {
// state that allows a new initialization.
static void ResetForTesting();
+ // Removes a histogram from the internal set of known ones. This can be
+ // necessary during testing persistent histograms where the underlying
+ // memory is being released.
+ static void ForgetHistogramForTesting(const std::string& name);
+
private:
// We keep a map of callbacks to histograms, so that as histograms are
// created, we can set the callback properly.

Powered by Google App Engine
This is Rietveld 408576698