Index: base/metrics/histogram.h |
diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h |
index c13f05e17904ce7461ffcb7106ef1cac8f3bbfd2..58bc0297aba45c9838fe22ed8949880288c7edea 100644 |
--- a/base/metrics/histogram.h |
+++ b/base/metrics/histogram.h |
@@ -121,6 +121,20 @@ class BASE_EXPORT Histogram : public HistogramBase { |
size_t bucket_count, |
int32 flags); |
+ // Overloads of the above two functions that take a const char* |name| param, |
+ // to avoid code bloat from the std::string constructor being inlined into |
+ // call sites. |
+ static HistogramBase* FactoryGet(const char* name, |
+ Sample minimum, |
+ Sample maximum, |
+ size_t bucket_count, |
+ int32 flags); |
+ static HistogramBase* FactoryTimeGet(const char* name, |
+ base::TimeDelta minimum, |
+ base::TimeDelta maximum, |
+ size_t bucket_count, |
+ int32 flags); |
+ |
static void InitializeBucketRanges(Sample minimum, |
Sample maximum, |
BucketRanges* ranges); |
@@ -277,6 +291,20 @@ class BASE_EXPORT LinearHistogram : public Histogram { |
size_t bucket_count, |
int32 flags); |
+ // Overloads of the above two functions that take a const char* |name| param, |
+ // to avoid code bloat from the std::string constructor being inlined into |
+ // call sites. |
+ static HistogramBase* FactoryGet(const char* name, |
+ Sample minimum, |
+ Sample maximum, |
+ size_t bucket_count, |
+ int32 flags); |
+ static HistogramBase* FactoryTimeGet(const char* name, |
+ TimeDelta minimum, |
+ TimeDelta maximum, |
+ size_t bucket_count, |
+ int32 flags); |
+ |
struct DescriptionPair { |
Sample sample; |
const char* description; // Null means end of a list of pairs. |
@@ -339,6 +367,11 @@ class BASE_EXPORT BooleanHistogram : public LinearHistogram { |
public: |
static HistogramBase* FactoryGet(const std::string& name, int32 flags); |
+ // Overload of the above function that takes a const char* |name| param, |
+ // to avoid code bloat from the std::string constructor being inlined into |
+ // call sites. |
+ static HistogramBase* FactoryGet(const char* name, int32 flags); |
+ |
HistogramType GetHistogramType() const override; |
private: |
@@ -364,6 +397,13 @@ class BASE_EXPORT CustomHistogram : public Histogram { |
const std::vector<Sample>& custom_ranges, |
int32 flags); |
+ // Overload of the above function that takes a const char* |name| param, |
+ // to avoid code bloat from the std::string constructor being inlined into |
+ // call sites. |
+ static HistogramBase* FactoryGet(const char* name, |
+ const std::vector<Sample>& custom_ranges, |
+ int32 flags); |
+ |
// Overridden from Histogram: |
HistogramType GetHistogramType() const override; |