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

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: remove DCHECK_IS_ON from .h files because it's not always defined and don't want to add the include 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..57e9a7d52ff0abfb92da5a177617fda4d2aa7fcd 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::PrepareFinalDelta(
+ const HistogramBase* histogram) {
+ PrepareSamples(histogram, histogram->SnapshotFinalDelta());
+}
+
+void HistogramSnapshotManager::PrepareFinalDeltaTakingOwnership(
+ std::unique_ptr<const HistogramBase> histogram) {
+ PrepareSamples(histogram.get(), histogram->SnapshotFinalDelta());
+ owned_histograms_.push_back(std::move(histogram));
+}
+
void HistogramSnapshotManager::FinishDeltas() {
DCHECK(preparing_deltas_);

Powered by Google App Engine
This is Rietveld 408576698