summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authormbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-27 19:56:54 +0000
committermbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-27 19:56:54 +0000
commit4500a724f92aafd3dddd18f33500e3551e45893f (patch)
treeec4e580744def01790ca342326c0ad0024c1e088 /chrome/app
parent0d6eb91cae5b6b72db209f3f7dcf2cae7810619c (diff)
downloadchromium_src-4500a724f92aafd3dddd18f33500e3551e45893f.zip
chromium_src-4500a724f92aafd3dddd18f33500e3551e45893f.tar.gz
chromium_src-4500a724f92aafd3dddd18f33500e3551e45893f.tar.bz2
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
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/chrome_dll_main.cc12
1 files changed, 7 insertions, 5 deletions
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<StatsCounterTimer>
startup_timer(chrome::Counters::chrome_main());