Index: base/metrics/stats_table.cc |
diff --git a/base/metrics/stats_table.cc b/base/metrics/stats_table.cc |
index 9585863089e05f04579514481533b9ead4eb070f..9b7f293f2dcbb94400ca0f55f8df21d61b12f865 100644 |
--- a/base/metrics/stats_table.cc |
+++ b/base/metrics/stats_table.cc |
@@ -248,7 +248,7 @@ struct StatsTable::TLSData { |
}; |
// We keep a singleton table which can be easily accessed. |
-StatsTable* StatsTable::global_table_ = NULL; |
+StatsTable* global_table = NULL; |
StatsTable::StatsTable(const std::string& name, int max_threads, |
int max_counters) |
@@ -281,8 +281,16 @@ StatsTable::~StatsTable() { |
delete impl_; |
// If we are the global table, unregister ourselves. |
- if (global_table_ == this) |
- global_table_ = NULL; |
+ if (global_table == this) |
+ global_table = NULL; |
+} |
+ |
+StatsTable* StatsTable::current() { |
+ return global_table; |
+} |
+ |
+void StatsTable::set_current(StatsTable* value) { |
+ global_table = value; |
} |
int StatsTable::GetSlot() const { |