summaryrefslogtreecommitdiffstats
path: root/base/stats_counters.h
diff options
context:
space:
mode:
authorevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-21 20:47:00 +0000
committerevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-21 20:47:00 +0000
commitd232c09f2584c80b6fde6b987fac32c8de57bfd7 (patch)
tree9e7601791ee5ccef2bef3bfde9e2eb85a5f095e3 /base/stats_counters.h
parent76328988113b8bfc1cda9efdc266213199d413ca (diff)
downloadchromium_src-d232c09f2584c80b6fde6b987fac32c8de57bfd7.zip
chromium_src-d232c09f2584c80b6fde6b987fac32c8de57bfd7.tar.gz
chromium_src-d232c09f2584c80b6fde6b987fac32c8de57bfd7.tar.bz2
Remove use of wide characters in stats table identifiers.
Review URL: http://codereview.chromium.org/11544 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5847 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/stats_counters.h')
-rw-r--r--base/stats_counters.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/base/stats_counters.h b/base/stats_counters.h
index 5dc7b89c..9927c19 100644
--- a/base/stats_counters.h
+++ b/base/stats_counters.h
@@ -74,10 +74,10 @@
class StatsCounter {
public:
// Create a StatsCounter object.
- explicit StatsCounter(const std::wstring& name)
+ explicit StatsCounter(const std::string& name)
: counter_id_(-1) {
// We prepend the name with 'c:' to indicate that it is a counter.
- name_ = L"c:";
+ name_ = "c:";
name_.append(name);
};
@@ -146,7 +146,7 @@ class StatsCounter {
if (counter_id_ == -1) {
counter_id_ = table->FindCounter(name_);
if (table->GetSlot() == 0) {
- if (!table->RegisterThread(L"")) {
+ if (!table->RegisterThread("")) {
// There is no room for this thread. This thread
// cannot use counters.
counter_id_ = 0;
@@ -163,7 +163,7 @@ class StatsCounter {
return NULL;
}
- std::wstring name_;
+ std::string name_;
// The counter id in the table. We initialize to -1 (an invalid value)
// and then cache it once it has been looked up. The counter_id is
// valid across all threads and processes.
@@ -177,9 +177,9 @@ class StatsCounter {
class StatsCounterTimer : protected StatsCounter {
public:
// Constructs and starts the timer.
- explicit StatsCounterTimer(const std::wstring& name) {
+ explicit StatsCounterTimer(const std::string& name) {
// we prepend the name with 't:' to indicate that it is a timer.
- name_ = L"t:";
+ name_ = "t:";
name_.append(name);
}
@@ -230,10 +230,10 @@ class StatsCounterTimer : protected StatsCounter {
class StatsRate : public StatsCounterTimer {
public:
// Constructs and starts the timer.
- explicit StatsRate(const wchar_t* name)
+ explicit StatsRate(const char* name)
: StatsCounterTimer(name),
counter_(name),
- largest_add_(std::wstring(L" ").append(name).append(L"MAX").c_str()) {
+ largest_add_(std::string(" ").append(name).append("MAX").c_str()) {
}
virtual void Add(int value) {