summaryrefslogtreecommitdiffstats
path: root/base/stats_table.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_table.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_table.h')
-rw-r--r--base/stats_table.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/base/stats_table.h b/base/stats_table.h
index 48da71a..18fb3dba 100644
--- a/base/stats_table.h
+++ b/base/stats_table.h
@@ -46,7 +46,7 @@ class StatsTable {
//
// max_counters is the maximum number of counters the table will support.
// If the StatsTable already exists, this number is ignored.
- StatsTable(const std::wstring& name, int max_threads, int max_counters);
+ StatsTable(const std::string& name, int max_threads, int max_counters);
// Destroys the StatsTable. When the last StatsTable is destroyed
// (across all processes), the StatsTable is removed from disk.
@@ -74,7 +74,7 @@ class StatsTable {
//
// On success, returns the slot id for this thread. On failure,
// returns 0.
- int RegisterThread(const std::wstring& name);
+ int RegisterThread(const std::string& name);
// Returns the number of threads currently registered. This is really not
// useful except for diagnostics and debugging.
@@ -86,7 +86,7 @@ class StatsTable {
// If the counter does not exist, attempts to create a row for the new
// counter. If there is no space in the table for the new counter,
// returns 0.
- int FindCounter(const std::wstring& name);
+ int FindCounter(const std::string& name);
// TODO(mbelshe): implement RemoveCounter.
@@ -96,7 +96,7 @@ class StatsTable {
// Gets the counter name at a particular row. If the row is empty,
// returns NULL.
- const wchar_t* GetRowName(int index) const;
+ const char* GetRowName(int index) const;
// Gets the sum of the values for a particular row.
int GetRowValue(int index) const;
@@ -106,11 +106,11 @@ class StatsTable {
// Gets the sum of the values for a particular counter. If the counter
// does not exist, creates the counter.
- int GetCounterValue(const std::wstring& name);
+ int GetCounterValue(const std::string& name);
// Gets the sum of the values for a particular counter for a given pid.
// If the counter does not exist, creates the counter.
- int GetCounterValue(const std::wstring& name, int pid);
+ int GetCounterValue(const std::string& name, int pid);
// The maxinum number of counters/rows in the table.
int GetMaxCounters() const;
@@ -129,7 +129,7 @@ class StatsTable {
// Convenience function to lookup a counter location for a
// counter by name for the calling thread. Will register
// the thread if it is not already registered.
- static int* FindLocation(const wchar_t *name);
+ static int* FindLocation(const char *name);
private:
// Returns the space occupied by a thread in the table. Generally used
@@ -154,7 +154,7 @@ class StatsTable {
// Locates a counter in the table or finds an empty row. Returns a
// number > 0 on success, or 0 on failure. The caller must hold the
// shared_memory_lock when calling this function.
- int FindCounterOrEmptyRow(const std::wstring& name) const;
+ int FindCounterOrEmptyRow(const std::string& name) const;
// Internal function to add a counter to the StatsTable. Assumes that
// the counter does not already exist in the table.
@@ -164,13 +164,13 @@ class StatsTable {
//
// On success, returns the counter_id for the newly added counter.
// On failure, returns 0.
- int AddCounter(const std::wstring& name);
+ int AddCounter(const std::string& name);
// Get the TLS data for the calling thread. Returns NULL if none is
// initialized.
StatsTableTLSData* GetTLSData() const;
- typedef base::hash_map<std::wstring, int> CountersMap;
+ typedef base::hash_map<std::string, int> CountersMap;
bool opened_;
StatsTablePrivate* impl_;