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 #include "base/metrics/histogram_base.h" | 5 #include "base/metrics/histogram_base.h" |
6 | 6 |
| 7 #include <climits> |
| 8 |
7 namespace base { | 9 namespace base { |
8 | 10 |
9 const HistogramBase::Sample HistogramBase::kSampleType_MAX = INT_MAX; | 11 const HistogramBase::Sample HistogramBase::kSampleType_MAX = INT_MAX; |
10 | 12 |
11 HistogramBase::HistogramBase(const std::string& name) | 13 HistogramBase::HistogramBase(const std::string& name) |
12 : histogram_name_(name) {} | 14 : histogram_name_(name), |
| 15 flags_(kNoFlags) {} |
13 | 16 |
14 HistogramBase::~HistogramBase() {} | 17 HistogramBase::~HistogramBase() {} |
15 | 18 |
| 19 void HistogramBase::SetFlags(int32 flags) { |
| 20 flags_ |= flags; |
| 21 } |
| 22 |
| 23 void HistogramBase::ClearFlags(int32 flags) { |
| 24 flags_ &= ~flags; |
| 25 } |
| 26 |
16 } // namespace base | 27 } // namespace base |
OLD | NEW |