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

Unified Diff: base/metrics/persistent_sample_map.h

Issue 1909673002: Support negative sample values in PersistentHistogramMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use separate flag to indicate 'import all' 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
« no previous file with comments | « no previous file | base/metrics/persistent_sample_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/persistent_sample_map.h
diff --git a/base/metrics/persistent_sample_map.h b/base/metrics/persistent_sample_map.h
index 6cde349390db6acfd7cdf5771b847a505e3253af..2ef70dab8b9b9f3c4409843f495b3e70a013a48a 100644
--- a/base/metrics/persistent_sample_map.h
+++ b/base/metrics/persistent_sample_map.h
@@ -81,15 +81,15 @@ class BASE_EXPORT PersistentSampleMap : public HistogramSamples {
HistogramBase::Sample value);
private:
- enum : HistogramBase::Sample { kAllSamples = -1 };
-
// Imports samples from persistent memory by iterating over all sample
// records found therein, adding them to the sample_counts_ map. If a
// count for the sample |until_value| is found, stop the import and return
// a pointer to that counter. If that value is not found, null will be
// returned after all currently available samples have been loaded. Pass
- // kAllSamples to force the importing of all available samples.
- HistogramBase::Count* ImportSamples(HistogramBase::Sample until_value);
+ // true for |import_everything| to force the importing of all available
+ // samples even if a match is found.
+ HistogramBase::Count* ImportSamples(HistogramBase::Sample until_value,
+ bool import_everything);
// All created/loaded sample values and their associated counts. The storage
// for the actual Count numbers is owned by the |records_| object and its
« no previous file with comments | « no previous file | base/metrics/persistent_sample_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698