Skip to content

Commit

Permalink
Move base/system_monitor/* to base/system/
Browse files Browse the repository at this point in the history
This is a first step in moving the system-wide metric measurement code out of base/process/

TBR: jam@chromium.org, dalecurtis@chromium.org
Bug: 891864
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I615190d5413937640a7bd29b68b18028445e4c88
Reviewed-on: https://chromium-review.googlesource.com/c/1260003
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597136}
  • Loading branch information
sebmarchand authored and Commit Bot committed Oct 5, 2018
1 parent 8c68384 commit 0f56c3c
Show file tree
Hide file tree
Showing 22 changed files with 29 additions and 31 deletions.
6 changes: 3 additions & 3 deletions base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -730,8 +730,8 @@ jumbo_component("base") {
#"sys_info_openbsd.cc", # Unused in Chromium build.
"syslog_logging.cc",
"syslog_logging.h",
"system_monitor/system_monitor.cc",
"system_monitor/system_monitor.h",
"system/system_monitor.cc",
"system/system_monitor.h",
"task/cancelable_task_tracker.cc",
"task/cancelable_task_tracker.h",
"task/lazy_task_runner.cc",
Expand Down Expand Up @@ -2434,7 +2434,7 @@ test("base_unittests") {
"synchronization/waitable_event_watcher_unittest.cc",
"sys_byteorder_unittest.cc",
"sys_info_unittest.cc",
"system_monitor/system_monitor_unittest.cc",
"system/system_monitor_unittest.cc",
"task/cancelable_task_tracker_unittest.cc",
"task/lazy_task_runner_unittest.cc",
"task/post_task_unittest.cc",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"

#include <utility>

Expand All @@ -14,7 +14,7 @@ namespace base {
static SystemMonitor* g_system_monitor = nullptr;

SystemMonitor::SystemMonitor()
: devices_changed_observer_list_(
: devices_changed_observer_list_(
new ObserverListThreadSafe<DevicesChangedObserver>()) {
DCHECK(!g_system_monitor);
g_system_monitor = this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_
#define BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_
#ifndef BASE_SYSTEM_SYSTEM_MONITOR_H_
#define BASE_SYSTEM_SYSTEM_MONITOR_H_

#include "base/base_export.h"
#include "base/macros.h"
Expand Down Expand Up @@ -64,12 +64,12 @@ class BASE_EXPORT SystemMonitor {
// Functions to trigger notifications.
void NotifyDevicesChanged(DeviceType device_type);

scoped_refptr<ObserverListThreadSafe<DevicesChangedObserver> >
scoped_refptr<ObserverListThreadSafe<DevicesChangedObserver>>
devices_changed_observer_list_;

DISALLOW_COPY_AND_ASSIGN(SystemMonitor);
};

} // namespace base

#endif // BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_
#endif // BASE_SYSTEM_SYSTEM_MONITOR_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"

#include "base/macros.h"
#include "base/message_loop/message_loop.h"
Expand All @@ -17,9 +17,7 @@ namespace {

class SystemMonitorTest : public testing::Test {
protected:
SystemMonitorTest() {
system_monitor_.reset(new SystemMonitor);
}
SystemMonitorTest() { system_monitor_.reset(new SystemMonitor); }

MessageLoop message_loop_;
std::unique_ptr<SystemMonitor> system_monitor_;
Expand Down
2 changes: 1 addition & 1 deletion base/test/mock_devices_changed_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <string>

#include "base/macros.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "testing/gmock/include/gmock/gmock.h"

namespace base {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "chrome/browser/extensions/chrome_extension_function.h"
#include "chrome/common/extensions/api/webrtc_audio_private.h"
#include "content/public/browser/render_process_host.h"
Expand Down
2 changes: 1 addition & 1 deletion chromeos/audio/cras_audio_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "base/bind_helpers.h"
#include "base/logging.h"
#include "base/sys_info.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "chromeos/audio/audio_devices_pref_handler_stub.h"
#include "chromeos/dbus/dbus_thread_manager.h"

Expand Down
2 changes: 1 addition & 1 deletion chromeos/audio/cras_audio_handler_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "base/test/scoped_task_environment.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/values.h"
Expand Down
2 changes: 1 addition & 1 deletion content/browser/browser_main_loop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/synchronization/waitable_event.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "base/task/post_task.h"
#include "base/task/task_scheduler/initialization_util.h"
#include "base/threading/thread.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "base/containers/flat_map.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "content/browser/media/media_devices_util.h"
#include "content/common/content_export.h"
#include "content/common/media/media_devices.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "base/containers/queue.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "content/browser/renderer_host/media/audio_input_device_manager.h"
Expand Down
2 changes: 1 addition & 1 deletion device/gamepad/gamepad_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "base/memory/read_only_shared_memory_region.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "base/time/time.h"
#include "device/gamepad/gamepad_export.h"
#include "device/gamepad/gamepad_pad_state_provider.h"
Expand Down
2 changes: 1 addition & 1 deletion media/audio/win/audio_device_listener_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "base/time/default_tick_clock.h"
#include "base/win/scoped_co_mem.h"
#include "base/win/windows_version.h"
Expand Down
2 changes: 1 addition & 1 deletion media/device_monitors/device_monitor_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "base/threading/thread_checker.h"
#include "media/base/media_export.h"

Expand Down
2 changes: 1 addition & 1 deletion media/device_monitors/device_monitor_udev.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <string>

#include "base/macros.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "device/udev_linux/udev.h"
#include "device/udev_linux/udev_linux.h"

Expand Down
2 changes: 1 addition & 1 deletion media/device_monitors/system_message_window_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "base/logging.h"
#include "base/macros.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "base/win/wrapped_window_proc.h"
#include "media/audio/win/core_audio_util_win.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "base/files/file_path.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "base/test/mock_devices_changed_observer.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand Down
2 changes: 1 addition & 1 deletion media/midi/midi_manager_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "build/build_config.h"
#include "media/midi/midi_service.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand Down
2 changes: 1 addition & 1 deletion media/midi/midi_manager_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "base/callback_forward.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "media/midi/midi_manager.h"

namespace base {
Expand Down
2 changes: 1 addition & 1 deletion services/audio/device_notifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <memory>

#include "base/containers/flat_map.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "services/audio/public/mojom/device_notifications.mojom.h"
#include "services/audio/traced_service_ref.h"
Expand Down
2 changes: 1 addition & 1 deletion services/audio/device_notifier_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <memory>
#include <utility>

#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "base/test/scoped_task_environment.h"
#include "services/audio/public/mojom/device_notifications.mojom.h"
#include "services/audio/traced_service_ref.h"
Expand Down
2 changes: 1 addition & 1 deletion services/audio/service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "base/system_monitor/system_monitor.h"
#include "base/system/system_monitor.h"
#include "base/time/default_tick_clock.h"
#include "base/trace_event/trace_event.h"
#include "media/audio/audio_manager.h"
Expand Down

0 comments on commit 0f56c3c

Please sign in to comment.