diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-26 19:48:34 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-26 19:48:34 +0000 |
commit | 097ae5a93a863b604fd6dbd939bed0c2be1afed2 (patch) | |
tree | 61177362b1c1bd2d1b2438acc50ccb2c061b176e /chrome/renderer/renderer_main.cc | |
parent | 902c971382790170852fe5b5d22d1b79adb31056 (diff) | |
download | chromium_src-097ae5a93a863b604fd6dbd939bed0c2be1afed2.zip chromium_src-097ae5a93a863b604fd6dbd939bed0c2be1afed2.tar.gz chromium_src-097ae5a93a863b604fd6dbd939bed0c2be1afed2.tar.bz2 |
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
Diffstat (limited to 'chrome/renderer/renderer_main.cc')
-rw-r--r-- | chrome/renderer/renderer_main.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/renderer/renderer_main.cc b/chrome/renderer/renderer_main.cc index 1531c40..c8f89c9 100644 --- a/chrome/renderer/renderer_main.cc +++ b/chrome/renderer/renderer_main.cc @@ -2,8 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "app/hi_res_timer_manager.h" #include "app/l10n_util.h" #include "app/resource_bundle.h" +#include "app/system_monitor.h" #include "base/command_line.h" #include "base/field_trial.h" #include "base/histogram.h" @@ -14,7 +16,6 @@ #include "base/scoped_nsautorelease_pool.h" #include "base/stats_counters.h" #include "base/string_util.h" -#include "base/system_monitor.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_counters.h" #include "chrome/common/chrome_switches.h" @@ -88,8 +89,8 @@ int RendererMain(const MainFunctionParams& parameters) { std::wstring app_name = chrome::kBrowserAppName; PlatformThread::SetName(WideToASCII(app_name + L"_RendererMain").c_str()); - // Initialize the SystemMonitor - base::SystemMonitor::Start(); + SystemMonitor system_monitor; + HighResolutionTimerManager hi_res_timer_manager; platform.PlatformInitialize(); |