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

Unified Diff: base/metrics/sparse_histogram_unittest.cc

Issue 2973863002: Remove std::string histogram name from HistogramBase object.
Patch Set: rebased Created 3 years, 4 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/sparse_histogram.cc ('k') | base/metrics/statistics_recorder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/sparse_histogram_unittest.cc
diff --git a/base/metrics/sparse_histogram_unittest.cc b/base/metrics/sparse_histogram_unittest.cc
index 3ad2bc86801c05111c2354224bef2100eabaffc1..12517c16ff589a8803de88c32394191ca5e79240 100644
--- a/base/metrics/sparse_histogram_unittest.cc
+++ b/base/metrics/sparse_histogram_unittest.cc
@@ -73,7 +73,7 @@ class SparseHistogramTest : public testing::TestWithParam<bool> {
GlobalHistogramAllocator::ReleaseForTesting();
}
- std::unique_ptr<SparseHistogram> NewSparseHistogram(const std::string& name) {
+ std::unique_ptr<SparseHistogram> NewSparseHistogram(const char* name) {
return std::unique_ptr<SparseHistogram>(new SparseHistogram(name));
}
@@ -181,7 +181,7 @@ TEST_P(SparseHistogramTest, MacroBasicTest) {
HistogramBase* sparse_histogram = histograms[0];
EXPECT_EQ(SPARSE_HISTOGRAM, sparse_histogram->GetHistogramType());
- EXPECT_EQ("Sparse", sparse_histogram->histogram_name());
+ EXPECT_EQ("Sparse", StringPiece(sparse_histogram->histogram_name()));
EXPECT_EQ(
HistogramBase::kUmaTargetedHistogramFlag |
(use_persistent_histogram_allocator_ ? HistogramBase::kIsPersistent
« no previous file with comments | « base/metrics/sparse_histogram.cc ('k') | base/metrics/statistics_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698