summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-18 07:04:06 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-18 07:04:06 +0000
commit69803a4f13f3eb26b982e82493672367e984907a (patch)
tree7129dda29bb0b45ae287e3d0b8d6c34e83ae98cc /content
parentc7e136fc8a564f1a30ef6214e4f2b5d598cfbe94 (diff)
downloadchromium_src-69803a4f13f3eb26b982e82493672367e984907a.zip
chromium_src-69803a4f13f3eb26b982e82493672367e984907a.tar.gz
chromium_src-69803a4f13f3eb26b982e82493672367e984907a.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 Review URL: http://codereview.chromium.org/7015017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85732 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_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
5 files changed, 12 insertions, 12 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_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;