OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_snapshot_manager.h" | 5 #include "base/metrics/histogram_snapshot_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
| 10 #include "base/macros.h" |
10 #include "base/metrics/histogram_delta_serialization.h" | 11 #include "base/metrics/histogram_delta_serialization.h" |
11 #include "base/metrics/histogram_macros.h" | 12 #include "base/metrics/histogram_macros.h" |
12 #include "base/metrics/statistics_recorder.h" | 13 #include "base/metrics/statistics_recorder.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 | 15 |
15 namespace base { | 16 namespace base { |
16 | 17 |
17 class HistogramFlattenerDeltaRecorder : public HistogramFlattener { | 18 class HistogramFlattenerDeltaRecorder : public HistogramFlattener { |
18 public: | 19 public: |
19 HistogramFlattenerDeltaRecorder() {} | 20 HistogramFlattenerDeltaRecorder() {} |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 histogram_snapshot_manager_.PrepareDeltas( | 97 histogram_snapshot_manager_.PrepareDeltas( |
97 HistogramBase::kNoFlags, HistogramBase::kUmaStabilityHistogramFlag); | 98 HistogramBase::kNoFlags, HistogramBase::kUmaStabilityHistogramFlag); |
98 | 99 |
99 const std::vector<std::string>& histograms = | 100 const std::vector<std::string>& histograms = |
100 histogram_flattener_delta_recorder_.GetRecordedDeltaHistogramNames(); | 101 histogram_flattener_delta_recorder_.GetRecordedDeltaHistogramNames(); |
101 EXPECT_EQ(1U, histograms.size()); | 102 EXPECT_EQ(1U, histograms.size()); |
102 EXPECT_EQ("UmaStabilityHistogram", histograms[0]); | 103 EXPECT_EQ("UmaStabilityHistogram", histograms[0]); |
103 } | 104 } |
104 | 105 |
105 } // namespace base | 106 } // namespace base |
OLD | NEW |