| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // If we observe this flag on a histogram being aggregated into after IPC, | 49 // If we observe this flag on a histogram being aggregated into after IPC, |
| 50 // then we are running in a single process mode, and the aggregation should | 50 // then we are running in a single process mode, and the aggregation should |
| 51 // not take place (as we would be aggregating back into the source | 51 // not take place (as we would be aggregating back into the source |
| 52 // histogram!). | 52 // histogram!). |
| 53 kIPCSerializationSourceFlag = 0x10, | 53 kIPCSerializationSourceFlag = 0x10, |
| 54 | 54 |
| 55 // Only for Histogram and its sub classes: fancy bucket-naming support. | 55 // Only for Histogram and its sub classes: fancy bucket-naming support. |
| 56 kHexRangePrintingFlag = 0x8000, | 56 kHexRangePrintingFlag = 0x8000, |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 HistogramBase(const std::string& name); | 59 explicit HistogramBase(const std::string& name); |
| 60 virtual ~HistogramBase(); | 60 virtual ~HistogramBase(); |
| 61 | 61 |
| 62 std::string histogram_name() const { return histogram_name_; } | 62 std::string histogram_name() const { return histogram_name_; } |
| 63 | 63 |
| 64 // Operations with Flags enum. | 64 // Operations with Flags enum. |
| 65 int32 flags() const { return flags_; } | 65 int32 flags() const { return flags_; } |
| 66 void SetFlags(int32 flags); | 66 void SetFlags(int32 flags); |
| 67 void ClearFlags(int32 flags); | 67 void ClearFlags(int32 flags); |
| 68 | 68 |
| 69 virtual HistogramType GetHistogramType() const = 0; | 69 virtual HistogramType GetHistogramType() const = 0; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 private: | 101 private: |
| 102 const std::string histogram_name_; | 102 const std::string histogram_name_; |
| 103 int32 flags_; | 103 int32 flags_; |
| 104 | 104 |
| 105 DISALLOW_COPY_AND_ASSIGN(HistogramBase); | 105 DISALLOW_COPY_AND_ASSIGN(HistogramBase); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 } // namespace base | 108 } // namespace base |
| 109 | 109 |
| 110 #endif // BASE_METRICS_HISTOGRAM_BASE_H_ | 110 #endif // BASE_METRICS_HISTOGRAM_BASE_H_ |
| OLD | NEW |