| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 typedef int Sample; // Used for samples. | 51 typedef int Sample; // Used for samples. |
| 52 typedef subtle::Atomic32 AtomicCount; // Used to count samples. | 52 typedef subtle::Atomic32 AtomicCount; // Used to count samples. |
| 53 typedef int32 Count; // Used to manipulate counts in temporaries. | 53 typedef int32 Count; // Used to manipulate counts in temporaries. |
| 54 | 54 |
| 55 static const Sample kSampleType_MAX; // INT_MAX | 55 static const Sample kSampleType_MAX; // INT_MAX |
| 56 | 56 |
| 57 enum Flags { | 57 enum Flags { |
| 58 kNoFlags = 0, | 58 kNoFlags = 0, |
| 59 kUmaTargetedHistogramFlag = 0x1, // Histogram should be UMA uploaded. | 59 kUmaTargetedHistogramFlag = 0x1, // Histogram should be UMA uploaded. |
| 60 | 60 |
| 61 // Indicate that this is a stability histogram. |
| 62 kStabilityHistogramFlag = 0x2, |
| 63 |
| 61 // Indicate that the histogram was pickled to be sent across an IPC Channel. | 64 // Indicate that the histogram was pickled to be sent across an IPC Channel. |
| 62 // If we observe this flag on a histogram being aggregated into after IPC, | 65 // If we observe this flag on a histogram being aggregated into after IPC, |
| 63 // then we are running in a single process mode, and the aggregation should | 66 // then we are running in a single process mode, and the aggregation should |
| 64 // not take place (as we would be aggregating back into the source | 67 // not take place (as we would be aggregating back into the source |
| 65 // histogram!). | 68 // histogram!). |
| 66 kIPCSerializationSourceFlag = 0x10, | 69 kIPCSerializationSourceFlag = 0x10, |
| 67 | 70 |
| 68 // Only for Histogram and its sub classes: fancy bucket-naming support. | 71 // Only for Histogram and its sub classes: fancy bucket-naming support. |
| 69 kHexRangePrintingFlag = 0x8000, | 72 kHexRangePrintingFlag = 0x8000, |
| 70 }; | 73 }; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 private: | 164 private: |
| 162 const std::string histogram_name_; | 165 const std::string histogram_name_; |
| 163 int32 flags_; | 166 int32 flags_; |
| 164 | 167 |
| 165 DISALLOW_COPY_AND_ASSIGN(HistogramBase); | 168 DISALLOW_COPY_AND_ASSIGN(HistogramBase); |
| 166 }; | 169 }; |
| 167 | 170 |
| 168 } // namespace base | 171 } // namespace base |
| 169 | 172 |
| 170 #endif // BASE_METRICS_HISTOGRAM_BASE_H_ | 173 #endif // BASE_METRICS_HISTOGRAM_BASE_H_ |
| OLD | NEW |