diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-14 21:22:31 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-14 21:22:31 +0000 |
commit | 08110ceae09a5e148e67bebd712e7ba1840ccf42 (patch) | |
tree | 94bdbbc82317bc6f7579d552aace6becd1beaab2 /chrome/browser | |
parent | a61c5c9bb6524d77c30b6a18f542c0e4616ee7bc (diff) | |
download | chromium_src-08110ceae09a5e148e67bebd712e7ba1840ccf42.zip chromium_src-08110ceae09a5e148e67bebd712e7ba1840ccf42.tar.gz chromium_src-08110ceae09a5e148e67bebd712e7ba1840ccf42.tar.bz2 |
Move SystemMonitor to src/ui/base/system_monitor.
Move HiResTimerManager to src/chrome/common.
BUG=none
TEST=none
TBR=brettw
Review URL: http://codereview.chromium.org/6361002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71487 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser_main.cc | 6 | ||||
-rw-r--r-- | chrome/browser/browser_main.h | 7 | ||||
-rw-r--r-- | chrome/browser/profiles/profile_manager.cc | 4 | ||||
-rw-r--r-- | chrome/browser/profiles/profile_manager.h | 4 | ||||
-rw-r--r-- | chrome/browser/profiles/profile_manager_unittest.cc | 6 | ||||
-rw-r--r-- | chrome/browser/tabs/tab_strip_model_unittest.cc | 6 |
6 files changed, 18 insertions, 15 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 961f783..64f0dd3 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -8,10 +8,8 @@ #include <string> #include <vector> -#include "app/hi_res_timer_manager.h" #include "app/l10n_util.h" #include "app/resource_bundle.h" -#include "app/system_monitor.h" #include "base/at_exit.h" #include "base/command_line.h" #include "base/debug/trace_event.h" @@ -78,6 +76,7 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/env_vars.h" +#include "chrome/common/hi_res_timer_manager.h" #include "chrome/common/json_pref_store.h" #include "chrome/common/jstemplate_builder.h" #include "chrome/common/logging_chrome.h" @@ -101,6 +100,7 @@ #include "net/spdy/spdy_session_pool.h" #include "net/url_request/url_request.h" #include "net/url_request/url_request_throttler_manager.h" +#include "ui/base/system_monitor/system_monitor.h" #if defined(USE_LINUX_BREAKPAD) #include "base/linux_util.h" @@ -469,7 +469,7 @@ void BrowserMainParts::MainMessageLoopStart() { main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI)); // TODO(viettrungluu): should these really go before setting the thread name? - system_monitor_.reset(new SystemMonitor); + system_monitor_.reset(new ui::SystemMonitor); hi_res_timer_manager_.reset(new HighResolutionTimerManager); network_change_notifier_.reset(net::NetworkChangeNotifier::Create()); diff --git a/chrome/browser/browser_main.h b/chrome/browser/browser_main.h index 9154a4c..7fd7142 100644 --- a/chrome/browser/browser_main.h +++ b/chrome/browser/browser_main.h @@ -17,12 +17,15 @@ class HighResolutionTimerManager; struct MainFunctionParams; class MessageLoop; class MetricsService; -class SystemMonitor; namespace net { class NetworkChangeNotifier; } +namespace ui { +class SystemMonitor; +} + // BrowserMainParts: // This class contains different "stages" to be executed in |BrowserMain()|, // mostly initialization. This is made into a class rather than just functions @@ -144,7 +147,7 @@ class BrowserMainParts { // Members initialized in |MainMessageLoopStart()| --------------------------- scoped_ptr<MessageLoop> main_message_loop_; - scoped_ptr<SystemMonitor> system_monitor_; + scoped_ptr<ui::SystemMonitor> system_monitor_; scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_; scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; scoped_ptr<BrowserThread> main_thread_; diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc index 87a03ea..2bae317 100644 --- a/chrome/browser/profiles/profile_manager.cc +++ b/chrome/browser/profiles/profile_manager.cc @@ -51,7 +51,7 @@ Profile* ProfileManager::GetDefaultProfile() { } ProfileManager::ProfileManager() : logged_in_(false) { - SystemMonitor::Get()->AddObserver(this); + ui::SystemMonitor::Get()->AddObserver(this); #if defined(OS_CHROMEOS) registrar_.Add( this, @@ -61,7 +61,7 @@ ProfileManager::ProfileManager() : logged_in_(false) { } ProfileManager::~ProfileManager() { - SystemMonitor* system_monitor = SystemMonitor::Get(); + ui::SystemMonitor* system_monitor = ui::SystemMonitor::Get(); if (system_monitor) system_monitor->RemoveObserver(this); diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h index 1d6483d..d2f9281 100644 --- a/chrome/browser/profiles/profile_manager.h +++ b/chrome/browser/profiles/profile_manager.h @@ -10,18 +10,18 @@ #include <vector> -#include "app/system_monitor.h" #include "base/basictypes.h" #include "base/message_loop.h" #include "base/threading/non_thread_safe.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/notification_observer.h" #include "chrome/common/notification_registrar.h" +#include "ui/base/system_monitor/system_monitor.h" class FilePath; class ProfileManager : public base::NonThreadSafe, - public SystemMonitor::PowerObserver, + public ui::SystemMonitor::PowerObserver, public NotificationObserver { public: ProfileManager(); diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc index 42f6d91..6f3ef1a 100644 --- a/chrome/browser/profiles/profile_manager_unittest.cc +++ b/chrome/browser/profiles/profile_manager_unittest.cc @@ -4,7 +4,6 @@ #include <string> -#include "app/system_monitor.h" #include "base/command_line.h" #include "base/file_util.h" #include "base/message_loop.h" @@ -18,6 +17,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/notification_service.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/system_monitor/system_monitor.h" class ProfileManagerTest : public testing::Test { protected: @@ -75,7 +75,7 @@ TEST_F(ProfileManagerTest, CreateProfile) { TEST_F(ProfileManagerTest, DefaultProfileDir) { CommandLine *cl = CommandLine::ForCurrentProcess(); - SystemMonitor dummy; + ui::SystemMonitor dummy; ProfileManager profile_manager; std::string profile_dir("my_user"); @@ -91,7 +91,7 @@ TEST_F(ProfileManagerTest, DefaultProfileDir) { // This functionality only exists on Chrome OS. TEST_F(ProfileManagerTest, LoggedInProfileDir) { CommandLine *cl = CommandLine::ForCurrentProcess(); - SystemMonitor dummy; + ui::SystemMonitor dummy; ProfileManager profile_manager; std::string profile_dir("my_user"); diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc index a21ef74..21ed2a5 100644 --- a/chrome/browser/tabs/tab_strip_model_unittest.cc +++ b/chrome/browser/tabs/tab_strip_model_unittest.cc @@ -5,7 +5,6 @@ #include <map> #include <string> -#include "app/system_monitor.h" #include "base/file_path.h" #include "base/file_util.h" #include "base/path_service.h" @@ -36,6 +35,7 @@ #include "chrome/common/url_constants.h" #include "chrome/test/testing_profile.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/system_monitor/system_monitor.h" using testing::_; @@ -230,8 +230,8 @@ class TabStripModelTest : public RenderViewHostTestHarness { std::wstring profile_path_; std::map<TabContents*, int> foo_; - // ProfileManager requires a SystemMonitor. - SystemMonitor system_monitor; + // ProfileManager requires a ui::SystemMonitor. + ui::SystemMonitor system_monitor; ProfileManager pm_; }; |