From 4500a724f92aafd3dddd18f33500e3551e45893f Mon Sep 17 00:00:00 2001 From: "mbelshe@google.com" Date: Fri, 27 Mar 2009 19:56:54 +0000 Subject: Hide StatsTable behind --enable-stats-table. Review URL: http://codereview.chromium.org/49045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12690 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/app/chrome_dll_main.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'chrome/app') diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index 1ef0dd0..26e8936 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -304,11 +304,13 @@ int ChromeMain(int argc, const char** argv) { // of the process. It is not cleaned up. // TODO(port): we probably need to shut this down correctly to avoid // leaking shared memory regions on posix platforms. - std::string statsfile = - StringPrintf("%s-%d", chrome::kStatsFilename, browser_pid); - StatsTable *stats_table = new StatsTable(statsfile, - chrome::kStatsMaxThreads, chrome::kStatsMaxCounters); - StatsTable::set_current(stats_table); + if (parsed_command_line.HasSwitch(switches::kEnableStatsTable)) { + std::string statsfile = + StringPrintf("%s-%d", chrome::kStatsFilename, browser_pid); + StatsTable *stats_table = new StatsTable(statsfile, + chrome::kStatsMaxThreads, chrome::kStatsMaxCounters); + StatsTable::set_current(stats_table); + } StatsScope startup_timer(chrome::Counters::chrome_main()); -- cgit v1.1