diff options
Diffstat (limited to 'base/metrics')
-rw-r--r-- | base/metrics/field_trial.h | 8 | ||||
-rw-r--r-- | base/metrics/histogram.h | 19 | ||||
-rw-r--r-- | base/metrics/stats_table.h | 5 |
3 files changed, 17 insertions, 15 deletions
diff --git a/base/metrics/field_trial.h b/base/metrics/field_trial.h index 1f0af9e..8902077 100644 --- a/base/metrics/field_trial.h +++ b/base/metrics/field_trial.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -217,12 +217,12 @@ class FieldTrialList { static size_t GetFieldTrialCount(); private: - // Helper function should be called only while holding lock_. - FieldTrial* PreLockedFind(const std::string& name); - // A map from FieldTrial names to the actual instances. typedef std::map<std::string, FieldTrial*> RegistrationList; + // Helper function should be called only while holding lock_. + FieldTrial* PreLockedFind(const std::string& name); + static FieldTrialList* global_; // The singleton of this class. // This will tell us if there is an attempt to register a field trial without diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h index 7ab5a77..3bb3f030 100644 --- a/base/metrics/histogram.h +++ b/base/metrics/histogram.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -542,11 +542,7 @@ class Histogram : public base::RefCountedThreadSafe<Histogram> { // buckets. class LinearHistogram : public Histogram { public: - virtual ClassType histogram_type() const; - - // Store a list of number/text values for use in rendering the histogram. - // The last element in the array has a null in its "description" slot. - virtual void SetRangeDescriptions(const DescriptionPair descriptions[]); + virtual ~LinearHistogram(); /* minimum should start from 1. 0 is as minimum is invalid. 0 is an implicit default underflow bucket. */ @@ -556,7 +552,12 @@ class LinearHistogram : public Histogram { TimeDelta minimum, TimeDelta maximum, size_t bucket_count, Flags flags); - virtual ~LinearHistogram(); + // Overridden from Histogram: + virtual ClassType histogram_type() const; + + // Store a list of number/text values for use in rendering the histogram. + // The last element in the array has a null in its "description" slot. + virtual void SetRangeDescriptions(const DescriptionPair descriptions[]); protected: LinearHistogram(const std::string& name, Sample minimum, @@ -610,11 +611,13 @@ class BooleanHistogram : public LinearHistogram { // CustomHistogram is a histogram for a set of custom integers. class CustomHistogram : public Histogram { public: - virtual ClassType histogram_type() const; static scoped_refptr<Histogram> FactoryGet(const std::string& name, const std::vector<Sample>& custom_ranges, Flags flags); + // Overridden from Histogram: + virtual ClassType histogram_type() const; + protected: CustomHistogram(const std::string& name, const std::vector<Sample>& custom_ranges); diff --git a/base/metrics/stats_table.h b/base/metrics/stats_table.h index 2a4f266..32b22eb 100644 --- a/base/metrics/stats_table.h +++ b/base/metrics/stats_table.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -132,6 +132,7 @@ class StatsTable { private: class Private; struct TLSData; + typedef hash_map<std::string, int> CountersMap; // Returns the space occupied by a thread in the table. Generally used // if a thread terminates but the process continues. This function @@ -171,8 +172,6 @@ class StatsTable { // initialized. TLSData* GetTLSData() const; - typedef hash_map<std::string, int> CountersMap; - Private* impl_; // The counters_lock_ protects the counters_ hash table. |