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

Unified Diff: base/histogram.cc

Issue 28046: Use string for Histogram names since these are all ASCII anyway wide-characte... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/histogram.h ('k') | base/histogram_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/histogram.cc
===================================================================
--- base/histogram.cc (revision 10269)
+++ base/histogram.cc (working copy)
@@ -23,10 +23,10 @@
// static
const int Histogram::kHexRangePrintingFlag = 0x8000;
-Histogram::Histogram(const wchar_t* name, Sample minimum,
+Histogram::Histogram(const char* name, Sample minimum,
Sample maximum, size_t bucket_count)
- : StatsRate(WideToASCII(name).c_str()),
- histogram_name_(WideToASCII(name)),
+ : StatsRate(name),
+ histogram_name_(name),
declared_min_(minimum),
declared_max_(maximum),
bucket_count_(bucket_count),
@@ -37,10 +37,10 @@
Initialize();
}
-Histogram::Histogram(const wchar_t* name, TimeDelta minimum,
+Histogram::Histogram(const char* name, TimeDelta minimum,
TimeDelta maximum, size_t bucket_count)
- : StatsRate(WideToASCII(name).c_str()),
- histogram_name_(WideToASCII(name)),
+ : StatsRate(name),
+ histogram_name_(name),
declared_min_(static_cast<int> (minimum.InMilliseconds())),
declared_max_(static_cast<int> (maximum.InMilliseconds())),
bucket_count_(bucket_count),
@@ -415,14 +415,14 @@
// buckets.
//------------------------------------------------------------------------------
-LinearHistogram::LinearHistogram(const wchar_t* name,
+LinearHistogram::LinearHistogram(const char* name,
Sample minimum, Sample maximum, size_t bucket_count)
: Histogram(name, minimum >= 1 ? minimum : 1, maximum, bucket_count) {
InitializeBucketRange();
DCHECK(ValidateBucketRanges());
}
-LinearHistogram::LinearHistogram(const wchar_t* name,
+LinearHistogram::LinearHistogram(const char* name,
TimeDelta minimum, TimeDelta maximum, size_t bucket_count)
: Histogram(name, minimum >= TimeDelta::FromMilliseconds(1) ?
minimum : TimeDelta::FromMilliseconds(1),
@@ -487,7 +487,7 @@
// This section provides implementation for ThreadSafeHistogram.
//------------------------------------------------------------------------------
-ThreadSafeHistogram::ThreadSafeHistogram(const wchar_t* name, Sample minimum,
+ThreadSafeHistogram::ThreadSafeHistogram(const char* name, Sample minimum,
Sample maximum, size_t bucket_count)
: Histogram(name, minimum, maximum, bucket_count),
lock_() {
@@ -650,4 +650,3 @@
Lock* StatisticsRecorder::lock_ = NULL;
// static
bool StatisticsRecorder::dump_on_exit_ = false;
-
« no previous file with comments | « base/histogram.h ('k') | base/histogram_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698