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

Unified Diff: base/metrics/statistics_recorder.h

Issue 1485763002: Merge multiple histogram snapshots into single one for reporting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shared-histograms
Patch Set: Change 'inconsistencies' from int to unsigned. 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 ef4481abbb4304539a85c4c796136b7e75abbebb..32f381bd717ba82b5a66b995e7beda326f42e402 100644
--- a/base/metrics/statistics_recorder.h
+++ b/base/metrics/statistics_recorder.h
@@ -129,6 +129,10 @@ class BASE_EXPORT StatisticsRecorder {
// histogram. This method is thread safe.
static OnSampleCallback FindCallback(const std::string& histogram_name);
+ // Clears all of the known histograms and resets static variables to a
+ // state that allows a new initialization.
+ static void ResetForTesting();
+
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