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

Unified Diff: components/cronet/histogram_manager.cc

Issue 1425533011: Support "shared" histograms between processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shmem-alloc
Patch Set: moved Create-Result histogram to private space and added to histograms.xml Created 4 years, 11 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 | « chrome/service/service_ipc_server.cc ('k') | components/metrics/metrics_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/service/service_ipc_server.cc ('k') | components/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698