Index: components/cronet/histogram_manager.cc |
diff --git a/components/cronet/histogram_manager.cc b/components/cronet/histogram_manager.cc |
index 7bd54c2979ea6b848aa5726bb212010693ba1527..4ec3adffb30b5cf39c9b07f8d0e8aeace32d04ef 100644 |
--- a/components/cronet/histogram_manager.cc |
+++ b/components/cronet/histogram_manager.cc |
@@ -10,6 +10,7 @@ |
#include "base/lazy_instance.h" |
#include "base/metrics/histogram.h" |
#include "base/metrics/histogram_samples.h" |
+#include "base/metrics/statistics_recorder.h" |
#include "components/metrics/histogram_encoder.h" |
namespace cronet { |
@@ -54,7 +55,11 @@ void HistogramManager::InconsistencyDetectedInLoggedCount(int amount) { |
bool HistogramManager::GetDeltas(std::vector<uint8_t>* data) { |
// Clear the protobuf between calls. |
uma_proto_.Clear(); |
+ // "false" to StatisticsRecorder::begin() indicates to *not* include |
+ // histograms held in persistent storage on the assumption that they will be |
+ // visible to the recipient through other means. |
histogram_snapshot_manager_.PrepareDeltas( |
+ base::StatisticsRecorder::begin(false), base::StatisticsRecorder::end(), |
base::Histogram::kNoFlags, base::Histogram::kUmaTargetedHistogramFlag); |
int32_t data_size = uma_proto_.ByteSize(); |
data->resize(data_size); |