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

Unified Diff: chrome/browser/extensions/api/metrics/metrics_apitest.cc

Issue 11342060: Histogram type support in HistogramBase and remove SetRangeDescription function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove "using" from metrics.cc Created 8 years, 2 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 | « chrome/browser/extensions/api/metrics/metrics.cc ('k') | net/disk_cache/stats_histogram.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/metrics/metrics_apitest.cc
diff --git a/chrome/browser/extensions/api/metrics/metrics_apitest.cc b/chrome/browser/extensions/api/metrics/metrics_apitest.cc
index 61edec7d16d3888cc244b64dd29e43899625f192..9ee37b9dc454fa01fdd135d29a5b4c77d8e422b7 100644
--- a/chrome/browser/extensions/api/metrics/metrics_apitest.cc
+++ b/chrome/browser/extensions/api/metrics/metrics_apitest.cc
@@ -28,20 +28,20 @@ struct RecordedUserAction {
// updated.
struct RecordedHistogram {
const char* name;
- base::Histogram::ClassType type;
+ base::HistogramType type;
int min;
int max;
size_t buckets;
} g_histograms[] = {
- {"test.h.1", base::Histogram::HISTOGRAM, 1, 100, 50}, // custom
- {"test.h.2", base::Histogram::LINEAR_HISTOGRAM, 1, 200, 50}, // custom
- {"test.h.3", base::Histogram::LINEAR_HISTOGRAM, 1, 101, 102}, // percentage
- {"test.time", base::Histogram::HISTOGRAM, 1, 10000, 50},
- {"test.medium.time", base::Histogram::HISTOGRAM, 1, 180000, 50},
- {"test.long.time", base::Histogram::HISTOGRAM, 1, 3600000, 50},
- {"test.count", base::Histogram::HISTOGRAM, 1, 1000000, 50},
- {"test.medium.count", base::Histogram::HISTOGRAM, 1, 10000, 50},
- {"test.small.count", base::Histogram::HISTOGRAM, 1, 100, 50},
+ {"test.h.1", base::HISTOGRAM, 1, 100, 50}, // custom
+ {"test.h.2", base::LINEAR_HISTOGRAM, 1, 200, 50}, // custom
+ {"test.h.3", base::LINEAR_HISTOGRAM, 1, 101, 102}, // percentage
+ {"test.time", base::HISTOGRAM, 1, 10000, 50},
+ {"test.medium.time", base::HISTOGRAM, 1, 180000, 50},
+ {"test.long.time", base::HISTOGRAM, 1, 3600000, 50},
+ {"test.count", base::HISTOGRAM, 1, 1000000, 50},
+ {"test.medium.count", base::HISTOGRAM, 1, 10000, 50},
+ {"test.small.count", base::HISTOGRAM, 1, 100, 50},
};
// This class observes and collects user action notifications that are sent
@@ -110,7 +110,7 @@ void ValidateHistograms(const RecordedHistogram* recorded,
base::Histogram* histogram(histograms[j]);
if (r.name == histogram->histogram_name()) {
- EXPECT_EQ(r.type, histogram->histogram_type());
+ EXPECT_EQ(r.type, histogram->GetHistogramType());
EXPECT_EQ(r.min, histogram->declared_min());
EXPECT_EQ(r.max, histogram->declared_max());
EXPECT_EQ(r.buckets, histogram->bucket_count());
« no previous file with comments | « chrome/browser/extensions/api/metrics/metrics.cc ('k') | net/disk_cache/stats_histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698