diff options
author | cpu <cpu@chromium.org> | 2015-02-11 16:46:22 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-12 00:47:05 +0000 |
commit | 50bc7eadc783059e840b9f08588d755db3f6289a (patch) | |
tree | 01374efec1933e6d5e0253b655341f2c64ac676c /content/app | |
parent | 6875d4e0e4db94ab8ca1151adf316325d93c4dc5 (diff) | |
download | chromium_src-50bc7eadc783059e840b9f08588d755db3f6289a.zip chromium_src-50bc7eadc783059e840b9f08588d755db3f6289a.tar.gz chromium_src-50bc7eadc783059e840b9f08588d755db3f6289a.tar.bz2 |
removing all the code related to chrome://stats
this is all broken and has been for a while. Since then, 2012 to 2013
other, sytem-specific systems have been used.
Note that there is a v8 test that is using the stats table. Hoping to sort this now.
BUG=149742
Review URL: https://codereview.chromium.org/899753002
Cr-Commit-Position: refs/heads/master@{#315890}
Diffstat (limited to 'content/app')
-rw-r--r-- | content/app/content_main_runner.cc | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc index a57f04a..3163a45 100644 --- a/content/app/content_main_runner.cc +++ b/content/app/content_main_runner.cc @@ -16,7 +16,6 @@ #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" -#include "base/metrics/stats_table.h" #include "base/path_service.h" #include "base/process/launch.h" #include "base/process/memory.h" @@ -211,38 +210,6 @@ static base::ProcessId GetBrowserPid(const base::CommandLine& command_line) { } #endif -static void InitializeStatsTable(const base::CommandLine& command_line) { - // Initialize the Stats Counters table. With this initialized, - // the StatsViewer can be utilized to read counters outside of - // Chrome. These lines can be commented out to effectively turn - // counters 'off'. The table is created and exists for the life - // of the process. It is not cleaned up. - if (command_line.HasSwitch(switches::kEnableStatsTable)) { - // NOTIMPLEMENTED: we probably need to shut this down correctly to avoid - // leaking shared memory regions on posix platforms. -#if defined(OS_POSIX) - // Stats table is in the global file descriptors table on Posix. - base::GlobalDescriptors* global_descriptors = - base::GlobalDescriptors::GetInstance(); - base::FileDescriptor table_ident; - if (global_descriptors->MaybeGet(kStatsTableSharedMemFd) != -1) { - // Open the shared memory file descriptor passed by the browser process. - table_ident = base::FileDescriptor( - global_descriptors->Get(kStatsTableSharedMemFd), false); - } -#elif defined(OS_WIN) - // Stats table is in a named segment on Windows. Use the PID to make this - // unique on the system. - std::string table_ident = - base::StringPrintf("%s-%u", kStatsFilename, - static_cast<unsigned int>(GetBrowserPid(command_line))); -#endif - base::StatsTable* stats_table = - new base::StatsTable(table_ident, kStatsMaxThreads, kStatsMaxCounters); - base::StatsTable::set_current(stats_table); - } -} - class ContentClientInitializer { public: static void Set(const std::string& process_type, @@ -334,11 +301,6 @@ int RunZygote(const MainFunctionParams& main_function_params, command_line.GetSwitchValueASCII(switches::kProcessType); ContentClientInitializer::Set(process_type, delegate); - // The StatsTable must be initialized in each process; we already - // initialized for the browser process, now we need to initialize - // within the new processes as well. - InitializeStatsTable(command_line); - MainFunctionParams main_params(command_line); main_params.zygote_child = true; @@ -755,8 +717,6 @@ class ContentMainRunnerImpl : public ContentMainRunner { #endif // V8_USE_EXTERNAL_STARTUP_DATA #endif // OS_ANDROID - InitializeStatsTable(command_line); - if (delegate_) delegate_->PreSandboxStartup(); |