| Index: third_party/WebKit/public/platform/Platform.h
|
| diff --git a/third_party/WebKit/public/platform/Platform.h b/third_party/WebKit/public/platform/Platform.h
|
| index 885a348626efa382279fe6fb63afd55484c1ea4e..5b878e59210df609255ccfe9a64f0bf0e5930ad8 100644
|
| --- a/third_party/WebKit/public/platform/Platform.h
|
| +++ b/third_party/WebKit/public/platform/Platform.h
|
| @@ -448,13 +448,27 @@ public:
|
| // Get a pointer to testing support interfaces. Will not be available in production builds.
|
| virtual WebUnitTestSupport* unitTestSupport() { return nullptr; }
|
|
|
| + typedef void* HistogramCacheSlot;
|
| +
|
| // Callbacks for reporting histogram data.
|
| // CustomCounts histogram has exponential bucket sizes, so that min=1, max=1000000, bucketCount=50 would do.
|
| - virtual void histogramCustomCounts(const char* name, int sample, int min, int max, int bucketCount) { }
|
| + // |cache_slot| is intended to be a thread safe pointer to an entry that
|
| + // the histogram code can store a lookup value in. Note that |name|
|
| + // MUST be the same as a previous call if providing a |cache_slot| that
|
| + // was used in a previous call.
|
| + virtual void histogramCustomCounts(const char* name, int sample, int min, int max, int bucketCount, HistogramCacheSlot* cache_slot = 0) {}
|
| // Enumeration histogram buckets are linear, boundaryValue should be larger than any possible sample value.
|
| - virtual void histogramEnumeration(const char* name, int sample, int boundaryValue) { }
|
| + // |cache_slot| is intended to be a thread safe pointer to an entry that
|
| + // the histogram code can store a lookup value in. Note that |name|
|
| + // MUST be the same as a previous call if providing a |cache_slot| that
|
| + // was used in a previous call.
|
| + virtual void histogramEnumeration(const char* name, int sample, int boundaryValue, HistogramCacheSlot* cache_slot = 0) {}
|
| // Unlike enumeration histograms, sparse histograms only allocate memory for non-empty buckets.
|
| - virtual void histogramSparse(const char* name, int sample) { }
|
| + // |cache_slot| is intended to be a thread safe pointer to an entry that
|
| + // the histogram code can store a lookup value in. Note that |name|
|
| + // MUST be the same as a previous call if providing a |cache_slot| that
|
| + // was used in a previous call.
|
| + virtual void histogramSparse(const char* name, int sample, HistogramCacheSlot* cache_slot = 0) {}
|
|
|
| // Record to a RAPPOR privacy-preserving metric, see: https://www.chromium.org/developers/design-documents/rappor.
|
| // recordRappor records a sample string, while recordRapporURL records the domain and registry of a url.
|
|
|