| 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 | 9 |
| 10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 PickleIterator* iter); | 43 PickleIterator* iter); |
| 44 | 44 |
| 45 // Create or find existing histogram and add the samples from pickle. | 45 // Create or find existing histogram and add the samples from pickle. |
| 46 // Silently returns when seeing any data problem in the pickle. | 46 // Silently returns when seeing any data problem in the pickle. |
| 47 BASE_EXPORT void DeserializeHistogramAndAddSamples(PickleIterator* iter); | 47 BASE_EXPORT void DeserializeHistogramAndAddSamples(PickleIterator* iter); |
| 48 | 48 |
| 49 //////////////////////////////////////////////////////////////////////////////// | 49 //////////////////////////////////////////////////////////////////////////////// |
| 50 | 50 |
| 51 class BASE_EXPORT HistogramBase { | 51 class BASE_EXPORT HistogramBase { |
| 52 public: | 52 public: |
| 53 typedef int Sample; // Used for samples. | 53 typedef int Sample; // Used for samples. |
| 54 typedef int Count; // Used to count samples. | 54 typedef subtle::Atomic32 Count; // Used to count samples. |
| 55 | 55 |
| 56 static const Sample kSampleType_MAX; // INT_MAX | 56 static const Sample kSampleType_MAX; // INT_MAX |
| 57 | 57 |
| 58 enum Flags { | 58 enum Flags { |
| 59 kNoFlags = 0, | 59 kNoFlags = 0, |
| 60 kUmaTargetedHistogramFlag = 0x1, // Histogram should be UMA uploaded. | 60 kUmaTargetedHistogramFlag = 0x1, // Histogram should be UMA uploaded. |
| 61 | 61 |
| 62 // Indicate that the histogram was pickled to be sent across an IPC Channel. | 62 // Indicate that the histogram was pickled to be sent across an IPC Channel. |
| 63 // If we observe this flag on a histogram being aggregated into after IPC, | 63 // If we observe this flag on a histogram being aggregated into after IPC, |
| 64 // then we are running in a single process mode, and the aggregation should | 64 // 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... |
| 162 private: | 162 private: |
| 163 const std::string histogram_name_; | 163 const std::string histogram_name_; |
| 164 int32 flags_; | 164 int32 flags_; |
| 165 | 165 |
| 166 DISALLOW_COPY_AND_ASSIGN(HistogramBase); | 166 DISALLOW_COPY_AND_ASSIGN(HistogramBase); |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 } // namespace base | 169 } // namespace base |
| 170 | 170 |
| 171 #endif // BASE_METRICS_HISTOGRAM_BASE_H_ | 171 #endif // BASE_METRICS_HISTOGRAM_BASE_H_ |
| OLD | NEW |