• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef BASE_METRICS_RECORD_HISTOGRAM_CHECKER_H_
6 #define BASE_METRICS_RECORD_HISTOGRAM_CHECKER_H_
7 
8 #include <stdint.h>
9 
10 #include "base/base_export.h"
11 
12 namespace base {
13 
14 // RecordHistogramChecker provides an interface for checking whether
15 // the given histogram should be recorded.
16 class BASE_EXPORT RecordHistogramChecker {
17  public:
18   virtual ~RecordHistogramChecker() = default;
19 
20   // Returns true iff the given histogram should be recorded.
21   // This method may be called on any thread, so it should not mutate any state.
22   virtual bool ShouldRecord(uint64_t histogram_hash) const = 0;
23 };
24 
25 }  // namespace base
26 
27 #endif  // BASE_METRICS_RECORD_HISTOGRAM_CHECKER_H_
28