Support "shared" histograms between processes.
Histograms have tradionally been held on the local heap and
passed between processes using RPCs or simply lost when that
process stops. Shared histograms are read directly by another
process.
https://docs.google.com/document/d/1YvBXzi745UDjiFVLjP8IWUMFgYL9gDb2J4xuwcv-c7o/edit?usp=sharing
BUG=546019
TBR=mmenke,nasko,thakis
for base/*.{gn,gypi}, components/cronet/*, and content/child/*
Review URL: https://codereview.chromium.org/1425533011
Cr-Commit-Position: refs/heads/master@{#372760}
diff --git a/base/metrics/histogram_delta_serialization.h b/base/metrics/histogram_delta_serialization.h
index 0a3983f8..a05a1a72 100644
--- a/base/metrics/histogram_delta_serialization.h
+++ b/base/metrics/histogram_delta_serialization.h
@@ -28,9 +28,12 @@
// Computes deltas in histogram bucket counts relative to the previous call to
// this method. Stores the deltas in serialized form into |serialized_deltas|.
- // If |serialized_deltas| is NULL, no data is serialized, though the next call
- // will compute the deltas relative to this one.
- void PrepareAndSerializeDeltas(std::vector<std::string>* serialized_deltas);
+ // If |serialized_deltas| is null, no data is serialized, though the next call
+ // will compute the deltas relative to this one. Setting |include_persistent|
+ // will include histograms held in persistent memory (and thus may be reported
+ // elsewhere); otherwise only histograms local to this process are serialized.
+ void PrepareAndSerializeDeltas(std::vector<std::string>* serialized_deltas,
+ bool include_persistent);
// Deserialize deltas and add samples to corresponding histograms, creating
// them if necessary. Silently ignores errors in |serialized_deltas|.