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

Unified Diff: base/metrics/histogram_snapshot_manager.cc

Issue 1891913002: Support saving browser metrics to disk and reading them during next run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed some build problems Created 4 years, 8 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/histogram_snapshot_manager.cc
diff --git a/base/metrics/histogram_snapshot_manager.cc b/base/metrics/histogram_snapshot_manager.cc
index e21d512daba271dc43248a9e63b598ce98d55472..c0f63d710e6108e04426af4cc16df7e60b0c89c8 100644
--- a/base/metrics/histogram_snapshot_manager.cc
+++ b/base/metrics/histogram_snapshot_manager.cc
@@ -60,6 +60,17 @@ void HistogramSnapshotManager::PrepareAbsoluteTakingOwnership(
owned_histograms_.push_back(std::move(histogram));
}
+void HistogramSnapshotManager::PrepareDifference(
+ const HistogramBase* histogram) {
+ PrepareSamples(histogram, histogram->SnapshotDifference());
+}
+
+void HistogramSnapshotManager::PrepareDifferenceTakingOwnership(
+ std::unique_ptr<const HistogramBase> histogram) {
+ PrepareSamples(histogram.get(), histogram->SnapshotDifference());
+ owned_histograms_.push_back(std::move(histogram));
+}
+
void HistogramSnapshotManager::FinishDeltas() {
DCHECK(preparing_deltas_);

Powered by Google App Engine
This is Rietveld 408576698