summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-18 07:29:56 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-18 07:29:56 +0000
commite41d7ddd66de84c0d521358d1478d9da77384563 (patch)
tree796268f8f8b66753c41eebb8c95d8c9a53872760 /content
parent6e20962febbab9e523976d0cc792710bf6daf521 (diff)
downloadchromium_src-e41d7ddd66de84c0d521358d1478d9da77384563.zip
chromium_src-e41d7ddd66de84c0d521358d1478d9da77384563.tar.gz
chromium_src-e41d7ddd66de84c0d521358d1478d9da77384563.tar.bz2
Move SystemMonitor to base/.
I plan to use SystemMonitor in net/. Fix up the Mac implementation not to use Cocoa APIs since @interface is not allowed in base. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=85732 Review URL: http://codereview.chromium.org/7015017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85737 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/common/hi_res_timer_manager.h6
-rw-r--r--content/common/hi_res_timer_manager_unittest.cc10
-rw-r--r--content/common/hi_res_timer_manager_win.cc4
-rw-r--r--content/plugin/plugin_main.cc6
-rw-r--r--content/renderer/renderer_main.cc4
-rw-r--r--content/worker/worker_main.cc4
6 files changed, 17 insertions, 17 deletions
diff --git a/content/common/hi_res_timer_manager.h b/content/common/hi_res_timer_manager.h
index af522cd..5c3ae38 100644
--- a/content/common/hi_res_timer_manager.h
+++ b/content/common/hi_res_timer_manager.h
@@ -6,16 +6,16 @@
#define CONTENT_COMMON_HI_RES_TIMER_MANAGER_H_
#pragma once
-#include "ui/base/system_monitor/system_monitor.h"
+#include "base/system_monitor/system_monitor.h"
// Ensures that the Windows high resolution timer is only used
// when not running on battery power.
-class HighResolutionTimerManager : public ui::SystemMonitor::PowerObserver {
+class HighResolutionTimerManager : public base::SystemMonitor::PowerObserver {
public:
HighResolutionTimerManager();
virtual ~HighResolutionTimerManager();
- // ui::SystemMonitor::PowerObserver:
+ // base::SystemMonitor::PowerObserver:
virtual void OnPowerStateChange(bool on_battery_power);
// Returns true if the hi resolution clock could be used right now.
diff --git a/content/common/hi_res_timer_manager_unittest.cc b/content/common/hi_res_timer_manager_unittest.cc
index 51ec295..64cd9fa 100644
--- a/content/common/hi_res_timer_manager_unittest.cc
+++ b/content/common/hi_res_timer_manager_unittest.cc
@@ -1,18 +1,18 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "testing/gtest/include/gtest/gtest.h"
+#include "content/common/hi_res_timer_manager.h"
#include "base/memory/scoped_ptr.h"
+#include "base/system_monitor/system_monitor.h"
#include "base/time.h"
-#include "content/common/hi_res_timer_manager.h"
-#include "ui/base/system_monitor/system_monitor.h"
+#include "testing/gtest/include/gtest/gtest.h"
#if defined(OS_WIN)
TEST(HiResTimerManagerTest, FLAKY_ToggleOnOff) {
MessageLoop loop;
- scoped_ptr<ui::SystemMonitor> system_monitor(new ui::SystemMonitor());
+ scoped_ptr<base::SystemMonitor> system_monitor(new base::SystemMonitor());
HighResolutionTimerManager manager;
// At this point, we don't know if the high resolution timers are on or off,
diff --git a/content/common/hi_res_timer_manager_win.cc b/content/common/hi_res_timer_manager_win.cc
index d41c4bd..45f22ba 100644
--- a/content/common/hi_res_timer_manager_win.cc
+++ b/content/common/hi_res_timer_manager_win.cc
@@ -8,13 +8,13 @@
HighResolutionTimerManager::HighResolutionTimerManager()
: hi_res_clock_available_(false) {
- ui::SystemMonitor* system_monitor = ui::SystemMonitor::Get();
+ base::SystemMonitor* system_monitor = base::SystemMonitor::Get();
system_monitor->AddObserver(this);
UseHiResClock(!system_monitor->BatteryPower());
}
HighResolutionTimerManager::~HighResolutionTimerManager() {
- ui::SystemMonitor::Get()->RemoveObserver(this);
+ base::SystemMonitor::Get()->RemoveObserver(this);
UseHiResClock(false);
}
diff --git a/content/plugin/plugin_main.cc b/content/plugin/plugin_main.cc
index fef3e95..2dea5e6 100644
--- a/content/plugin/plugin_main.cc
+++ b/content/plugin/plugin_main.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -12,13 +12,13 @@
#include "base/command_line.h"
#include "base/message_loop.h"
#include "base/string_util.h"
+#include "base/system_monitor/system_monitor.h"
#include "base/threading/platform_thread.h"
#include "content/common/child_process.h"
#include "content/common/content_switches.h"
#include "content/common/hi_res_timer_manager.h"
#include "content/common/main_function_params.h"
#include "content/plugin/plugin_thread.h"
-#include "ui/base/system_monitor/system_monitor.h"
#if defined(OS_WIN)
#include "content/common/injection_test_dll.h"
@@ -86,7 +86,7 @@ int PluginMain(const MainFunctionParams& parameters) {
MessageLoop main_message_loop(MessageLoop::TYPE_UI);
base::PlatformThread::SetName("CrPluginMain");
- ui::SystemMonitor system_monitor;
+ base::SystemMonitor system_monitor;
HighResolutionTimerManager high_resolution_timer_manager;
const CommandLine& parsed_command_line = parameters.command_line_;
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc
index 36c73ba..2551e14 100644
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -19,6 +19,7 @@
#include "base/path_service.h"
#include "base/process_util.h"
#include "base/string_util.h"
+#include "base/system_monitor/system_monitor.h"
#include "base/threading/platform_thread.h"
#include "base/time.h"
#include "content/common/content_counters.h"
@@ -29,7 +30,6 @@
#include "content/renderer/render_process_impl.h"
#include "content/renderer/render_thread.h"
#include "content/renderer/renderer_main_platform_delegate.h"
-#include "ui/base/system_monitor/system_monitor.h"
#include "ui/base/ui_base_switches.h"
#if defined(OS_MACOSX)
@@ -176,7 +176,7 @@ int RendererMain(const MainFunctionParams& parameters) {
base::PlatformThread::SetName("CrRendererMain");
- ui::SystemMonitor system_monitor;
+ base::SystemMonitor system_monitor;
HighResolutionTimerManager hi_res_timer_manager;
platform.PlatformInitialize();
diff --git a/content/worker/worker_main.cc b/content/worker/worker_main.cc
index 6ec0263..88acc21 100644
--- a/content/worker/worker_main.cc
+++ b/content/worker/worker_main.cc
@@ -6,12 +6,12 @@
#include "base/command_line.h"
#include "base/message_loop.h"
#include "base/string_util.h"
+#include "base/system_monitor/system_monitor.h"
#include "base/threading/platform_thread.h"
#include "content/common/child_process.h"
#include "content/common/hi_res_timer_manager.h"
#include "content/common/main_function_params.h"
#include "content/worker/worker_thread.h"
-#include "ui/base/system_monitor/system_monitor.h"
#if defined(OS_WIN)
#include "content/common/sandbox_init_wrapper.h"
@@ -24,7 +24,7 @@ int WorkerMain(const MainFunctionParams& parameters) {
MessageLoop main_message_loop;
base::PlatformThread::SetName("CrWorkerMain");
- ui::SystemMonitor system_monitor;
+ base::SystemMonitor system_monitor;
HighResolutionTimerManager hi_res_timer_manager;
ChildProcess worker_process;