Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Unified Diff: base/metrics/sample_map.h

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/metrics/histogram_unittest.cc ('k') | base/metrics/sample_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/sample_map.h
diff --git a/base/metrics/sample_map.h b/base/metrics/sample_map.h
deleted file mode 100644
index 952d34a1c4a96b38b1f00e17e15638c51ae8db1a..0000000000000000000000000000000000000000
--- a/base/metrics/sample_map.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// SampleMap implements HistogramSamples interface. It is used by the
-// SparseHistogram class to store samples.
-
-#ifndef BASE_METRICS_SAMPLE_MAP_H_
-#define BASE_METRICS_SAMPLE_MAP_H_
-
-#include <map>
-
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/metrics/histogram_base.h"
-#include "base/metrics/histogram_samples.h"
-
-namespace base {
-
-class BASE_EXPORT_PRIVATE SampleMap : public HistogramSamples {
- public:
- SampleMap();
- ~SampleMap() override;
-
- // HistogramSamples implementation:
- void Accumulate(HistogramBase::Sample value,
- HistogramBase::Count count) override;
- HistogramBase::Count GetCount(HistogramBase::Sample value) const override;
- HistogramBase::Count TotalCount() const override;
- scoped_ptr<SampleCountIterator> Iterator() const override;
-
- protected:
- bool AddSubtractImpl(
- SampleCountIterator* iter,
- HistogramSamples::Operator op) override; // |op| is ADD or SUBTRACT.
-
- private:
- std::map<HistogramBase::Sample, HistogramBase::Count> sample_counts_;
-
- DISALLOW_COPY_AND_ASSIGN(SampleMap);
-};
-
-class BASE_EXPORT_PRIVATE SampleMapIterator : public SampleCountIterator {
- public:
- typedef std::map<HistogramBase::Sample, HistogramBase::Count>
- SampleToCountMap;
-
- explicit SampleMapIterator(const SampleToCountMap& sample_counts);
- ~SampleMapIterator() override;
-
- // SampleCountIterator implementation:
- bool Done() const override;
- void Next() override;
- void Get(HistogramBase::Sample* min,
- HistogramBase::Sample* max,
- HistogramBase::Count* count) const override;
-
- private:
- void SkipEmptyBuckets();
-
- SampleToCountMap::const_iterator iter_;
- const SampleToCountMap::const_iterator end_;
-};
-
-} // namespace base
-
-#endif // BASE_METRICS_SAMPLE_MAP_H_
« no previous file with comments | « base/metrics/histogram_unittest.cc ('k') | base/metrics/sample_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698