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

Unified Diff: base/metrics/stats_table.cc

Issue 15403002: Remving global statics from the headers, so we can split-link. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adding export Created 7 years, 7 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/metrics/stats_table.h ('k') | content/common/child_process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « base/metrics/stats_table.h ('k') | content/common/child_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698