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

Unified Diff: base/metrics/histogram.h

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 | « base/metrics/field_trial_unittest.cc ('k') | base/metrics/histogram.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « base/metrics/field_trial_unittest.cc ('k') | base/metrics/histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698