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

Unified Diff: base/metrics/histogram.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: removed some unnecessary includes Created 4 years, 7 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
« no previous file with comments | « no previous file | base/metrics/histogram.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram.h
diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h
index d4d009c6ae01c1fa246c5e3a364969899a39aa4d..2283a4d80fd142bbc3b701b9d996af04c48d3128 100644
--- a/base/metrics/histogram.h
+++ b/base/metrics/histogram.h
@@ -204,6 +204,7 @@ class BASE_EXPORT Histogram : public HistogramBase {
void AddCount(Sample value, int count) override;
std::unique_ptr<HistogramSamples> SnapshotSamples() const override;
std::unique_ptr<HistogramSamples> SnapshotDelta() override;
+ std::unique_ptr<HistogramSamples> SnapshotFinalDelta() const override;
void AddSamples(const HistogramSamples& samples) override;
bool AddSamplesFromPickle(base::PickleIterator* iter) override;
void WriteHTMLGraph(std::string* output) const override;
@@ -313,6 +314,10 @@ class BASE_EXPORT Histogram : public HistogramBase {
// Also keep a previous uploaded state for calculating deltas.
std::unique_ptr<HistogramSamples> logged_samples_;
+ // Flag to indicate if PrepareFinalDelta has been previously called. It is
+ // used to DCHECK that a final delta is not created multiple times.
+ mutable bool final_delta_created_ = false;
+
DISALLOW_COPY_AND_ASSIGN(Histogram);
};
« no previous file with comments | « no previous file | base/metrics/histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698