OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_METRICS_HISTOGRAM_BASE_H_ | 5 #ifndef BASE_METRICS_HISTOGRAM_BASE_H_ |
6 #define BASE_METRICS_HISTOGRAM_BASE_H_ | 6 #define BASE_METRICS_HISTOGRAM_BASE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 25 matching lines...) Expand all Loading... |
36 LINEAR_HISTOGRAM, | 36 LINEAR_HISTOGRAM, |
37 BOOLEAN_HISTOGRAM, | 37 BOOLEAN_HISTOGRAM, |
38 CUSTOM_HISTOGRAM, | 38 CUSTOM_HISTOGRAM, |
39 SPARSE_HISTOGRAM, | 39 SPARSE_HISTOGRAM, |
40 }; | 40 }; |
41 | 41 |
42 std::string HistogramTypeToString(HistogramType type); | 42 std::string HistogramTypeToString(HistogramType type); |
43 | 43 |
44 // Create or find existing histogram that matches the pickled info. | 44 // Create or find existing histogram that matches the pickled info. |
45 // Returns NULL if the pickled data has problems. | 45 // Returns NULL if the pickled data has problems. |
46 BASE_EXPORT_PRIVATE HistogramBase* DeserializeHistogramInfo( | 46 BASE_EXPORT HistogramBase* DeserializeHistogramInfo(base::PickleIterator* iter); |
47 base::PickleIterator* iter); | |
48 | 47 |
49 //////////////////////////////////////////////////////////////////////////////// | 48 //////////////////////////////////////////////////////////////////////////////// |
50 | 49 |
51 class BASE_EXPORT HistogramBase { | 50 class BASE_EXPORT HistogramBase { |
52 public: | 51 public: |
53 typedef int32_t Sample; // Used for samples. | 52 typedef int32_t Sample; // Used for samples. |
54 typedef subtle::Atomic32 AtomicCount; // Used to count samples. | 53 typedef subtle::Atomic32 AtomicCount; // Used to count samples. |
55 typedef int32_t Count; // Used to manipulate counts in temporaries. | 54 typedef int32_t Count; // Used to manipulate counts in temporaries. |
56 | 55 |
57 static const Sample kSampleType_MAX; // INT_MAX | 56 static const Sample kSampleType_MAX; // INT_MAX |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 private: | 190 private: |
192 const std::string histogram_name_; | 191 const std::string histogram_name_; |
193 int32_t flags_; | 192 int32_t flags_; |
194 | 193 |
195 DISALLOW_COPY_AND_ASSIGN(HistogramBase); | 194 DISALLOW_COPY_AND_ASSIGN(HistogramBase); |
196 }; | 195 }; |
197 | 196 |
198 } // namespace base | 197 } // namespace base |
199 | 198 |
200 #endif // BASE_METRICS_HISTOGRAM_BASE_H_ | 199 #endif // BASE_METRICS_HISTOGRAM_BASE_H_ |
OLD | NEW |