| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // Create or find existing histogram that matches the pickled info. | 42 // Create or find existing histogram that matches the pickled info. |
| 43 // Returns NULL if the pickled data has problems. | 43 // Returns NULL if the pickled data has problems. |
| 44 BASE_EXPORT_PRIVATE HistogramBase* DeserializeHistogramInfo( | 44 BASE_EXPORT_PRIVATE HistogramBase* DeserializeHistogramInfo( |
| 45 PickleIterator* iter); | 45 PickleIterator* iter); |
| 46 | 46 |
| 47 //////////////////////////////////////////////////////////////////////////////// | 47 //////////////////////////////////////////////////////////////////////////////// |
| 48 | 48 |
| 49 class BASE_EXPORT HistogramBase { | 49 class BASE_EXPORT HistogramBase { |
| 50 public: | 50 public: |
| 51 typedef int Sample; // Used for samples. | 51 typedef int Sample; // Used for samples. |
| 52 typedef subtle::Atomic32 Count; // Used to count samples. | 52 typedef subtle::Atomic32 AtomicCount; // Used to count samples. |
| 53 typedef int32 Count; // Used to manipulate counts in temporaries. |
| 53 | 54 |
| 54 static const Sample kSampleType_MAX; // INT_MAX | 55 static const Sample kSampleType_MAX; // INT_MAX |
| 55 | 56 |
| 56 enum Flags { | 57 enum Flags { |
| 57 kNoFlags = 0, | 58 kNoFlags = 0, |
| 58 kUmaTargetedHistogramFlag = 0x1, // Histogram should be UMA uploaded. | 59 kUmaTargetedHistogramFlag = 0x1, // Histogram should be UMA uploaded. |
| 59 | 60 |
| 60 // Indicate that the histogram was pickled to be sent across an IPC Channel. | 61 // Indicate that the histogram was pickled to be sent across an IPC Channel. |
| 61 // If we observe this flag on a histogram being aggregated into after IPC, | 62 // If we observe this flag on a histogram being aggregated into after IPC, |
| 62 // then we are running in a single process mode, and the aggregation should | 63 // then we are running in a single process mode, and the aggregation should |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 private: | 161 private: |
| 161 const std::string histogram_name_; | 162 const std::string histogram_name_; |
| 162 int32 flags_; | 163 int32 flags_; |
| 163 | 164 |
| 164 DISALLOW_COPY_AND_ASSIGN(HistogramBase); | 165 DISALLOW_COPY_AND_ASSIGN(HistogramBase); |
| 165 }; | 166 }; |
| 166 | 167 |
| 167 } // namespace base | 168 } // namespace base |
| 168 | 169 |
| 169 #endif // BASE_METRICS_HISTOGRAM_BASE_H_ | 170 #endif // BASE_METRICS_HISTOGRAM_BASE_H_ |
| OLD | NEW |