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_base.h b/base/metrics/histogram_base.h
index 4fa07c6..d8bd0f4 100644
--- a/base/metrics/histogram_base.h
+++ b/base/metrics/histogram_base.h
@@ -21,6 +21,7 @@
namespace base {
+class BucketRanges;
class DictionaryValue;
class HistogramBase;
class HistogramSamples;
@@ -81,6 +82,13 @@
// to shortcut looking up the callback if it doesn't exist.
kCallbackExists = 0x20,
+ // Indicates that the histogram is held in "persistent" memory and may
+ // be accessible between processes. This is only possible if such a
+ // memory segment has been created/attached, used to create a Persistent-
+ // MemoryAllocator, and that loaded into the Histogram module before this
+ // histogram is created.
+ kIsPersistent = 0x40,
+
// Only for Histogram and its sub classes: fancy bucket-naming support.
kHexRangePrintingFlag = 0x8000,
};