From 097ae5a93a863b604fd6dbd939bed0c2be1afed2 Mon Sep 17 00:00:00 2001 From: "phajdan.jr@chromium.org" Date: Thu, 26 Nov 2009 19:48:34 +0000 Subject: Make SystemMonitor not a Singleton and move it out of base SystemMonitor makes an assumption that through its lifetime a MessageLoop exists and stays the same. It is difficult and error-prone to satisfy that when it is a Singleton. It has caused problems in the past. Additionally, extract HighResoltionTimerManager out of time_win.cc, eliminating yet another Singleton. TEST=none BUG=none Review URL: http://codereview.chromium.org/431008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33214 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/plugin/plugin_main.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'chrome/plugin/plugin_main.cc') diff --git a/chrome/plugin/plugin_main.cc b/chrome/plugin/plugin_main.cc index 0b67360..9794305 100644 --- a/chrome/plugin/plugin_main.cc +++ b/chrome/plugin/plugin_main.cc @@ -4,13 +4,14 @@ #include "build/build_config.h" +#include "app/hi_res_timer_manager.h" +#include "app/system_monitor.h" #if defined(OS_WIN) #include "app/win_util.h" #endif #include "base/command_line.h" #include "base/message_loop.h" #include "base/string_util.h" -#include "base/system_monitor.h" #include "chrome/common/child_process.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" @@ -89,8 +90,8 @@ int PluginMain(const MainFunctionParams& parameters) { std::wstring app_name = chrome::kBrowserAppName; PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str()); - // Initialize the SystemMonitor - base::SystemMonitor::Start(); + SystemMonitor system_monitor; + HighResolutionTimerManager high_resolution_timer_manager; #if defined(OS_MACOSX) TrimInterposeEnvironment(); -- cgit v1.1