| Index: base/metrics/histogram_snapshot_manager.h
|
| diff --git a/base/metrics/histogram_snapshot_manager.h b/base/metrics/histogram_snapshot_manager.h
|
| index fe26faad1138c6dbaa57f40b9d23c56eeb3ecb94..51bf92c7b55aa1bc81cf8b6b79a300640b3cbcb9 100644
|
| --- a/base/metrics/histogram_snapshot_manager.h
|
| +++ b/base/metrics/histogram_snapshot_manager.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include <stdint.h>
|
|
|
| +#include <atomic>
|
| #include <map>
|
| #include <string>
|
| #include <vector>
|
| @@ -14,7 +15,6 @@
|
| #include "base/gtest_prod_util.h"
|
| #include "base/macros.h"
|
| #include "base/metrics/histogram_base.h"
|
| -#include "base/threading/thread_checker.h"
|
|
|
| namespace base {
|
|
|
| @@ -76,15 +76,19 @@ class BASE_EXPORT HistogramSnapshotManager {
|
| void PrepareSamples(const HistogramBase* histogram,
|
| std::unique_ptr<HistogramSamples> samples);
|
|
|
| + // |histogram_flattener_| handles the logistics of recording the histogram
|
| + // deltas.
|
| + HistogramFlattener* const histogram_flattener_; // Weak.
|
| +
|
| // For histograms, track what has been previously seen, indexed
|
| // by the hash of the histogram name.
|
| std::map<uint64_t, SampleInfo> known_histograms_;
|
|
|
| - // |histogram_flattener_| handles the logistics of recording the histogram
|
| - // deltas.
|
| - HistogramFlattener* histogram_flattener_; // Weak.
|
| -
|
| - ThreadChecker thread_checker_;
|
| + // A flag indicating if a thread is currently doing an operation. This is
|
| + // used to check against concurrent access which is not supported. A Thread-
|
| + // Checker is not sufficient because it may be guarded by at outside lock
|
| + // (as is the case with cronet).
|
| + std::atomic<bool> is_active_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(HistogramSnapshotManager);
|
| };
|
|
|