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

Unified Diff: base/metrics/histogram_snapshot_manager.h

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.h
diff --git a/base/metrics/histogram_snapshot_manager.h b/base/metrics/histogram_snapshot_manager.h
index 42dbac225d830838db4f998020265ec8fe03e380..ca7e7afb9270f762bd4775f242d1df3698e8af15 100644
--- a/base/metrics/histogram_snapshot_manager.h
+++ b/base/metrics/histogram_snapshot_manager.h
@@ -62,6 +62,9 @@ class BASE_EXPORT HistogramSnapshotManager {
// until FinishDeltas() completes. PrepareAbsolute() works the same
// but assumes there were no previous logged values and no future deltas
// will be created (and thus can work on read-only histograms).
+ // PrepareFinalDelta() works like PrepareDelta() except that it does
+ // not update the previous logged values and can thus be used with
+ // read-only files.
// Use Prepare*TakingOwnership() if it is desireable to have this class
// automatically delete the histogram once it is "finished".
void StartDeltas();
@@ -70,6 +73,9 @@ class BASE_EXPORT HistogramSnapshotManager {
void PrepareAbsolute(const HistogramBase* histogram);
void PrepareAbsoluteTakingOwnership(
std::unique_ptr<const HistogramBase> histogram);
+ void PrepareFinalDelta(const HistogramBase* histogram);
Ilya Sherman 2016/05/04 06:48:07 nit: Only the TakingOwnership() method is used, so
bcwhite 2016/05/04 14:12:50 <shudder> I hate inconsistent APIs. But done.
+ void PrepareFinalDeltaTakingOwnership(
+ std::unique_ptr<const HistogramBase> histogram);
void FinishDeltas();
private:

Powered by Google App Engine
This is Rietveld 408576698