Commit 97338136 authored by Sean McAllister's avatar Sean McAllister Committed by Commit Bot

Refactor OS_LINUX preprocessor directive for LaCrOS effort.

Currently, ChromeOS defines the OS_LINUX directive as well as
OS_CHROMEOS.  We're working to separate these two, so we're
making the fact that OS_LINUX == OS_LINUX || OS_CHROMEOS
explicit.

This is changes for /chrome/browser/ui/global_media_controls

This CL was uploaded by git cl split.

R=steimel@chromium.org

Bug: 1110266
Change-Id: Id2f3bd9416254e8dc8734dd43a874910e0697280
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2370284
Auto-Submit: Sean McAllister <smcallis@google.com>
Reviewed-by: default avatarTommy Steimel <steimel@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801047}
parent e221ccf9
......@@ -23,7 +23,7 @@ MediaNotificationDeviceMonitor::Create(
// The device monitor implementation on linux does not reliably detect
// connection changes for some devices. In this case we fall back to polling the
// device provider. See crbug.com/1112480 for more information.
#if defined(OS_LINUX) && defined(USE_UDEV)
#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(USE_UDEV)
return std::make_unique<PollingDeviceMonitorImpl>(device_provider);
#else
return std::make_unique<SystemMonitorDeviceMonitorImpl>();
......@@ -42,7 +42,7 @@ void MediaNotificationDeviceMonitor::RemoveDevicesChangedObserver(
MediaNotificationDeviceMonitor::MediaNotificationDeviceMonitor() = default;
#if !(defined(OS_LINUX) && defined(USE_UDEV))
#if !((defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(USE_UDEV))
// SystemMonitorDeviceMonitorImpl
SystemMonitorDeviceMonitorImpl::SystemMonitorDeviceMonitorImpl() {
base::SystemMonitor::Get()->AddDevicesChangedObserver(this);
......
......@@ -45,7 +45,7 @@ class MediaNotificationDeviceMonitor {
base::ObserverList<DevicesChangedObserver> observers_;
};
#if !(defined(OS_LINUX) && defined(USE_UDEV))
#if !((defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(USE_UDEV))
// Monitors device changes by observing the SystemMonitor
class SystemMonitorDeviceMonitorImpl
: public MediaNotificationDeviceMonitor,
......@@ -88,6 +88,6 @@ class PollingDeviceMonitorImpl : public MediaNotificationDeviceMonitor {
base::WeakPtrFactory<PollingDeviceMonitorImpl> weak_ptr_factory_{this};
};
#endif // !(defined(OS_LINUX) && defined(USE_UDEV))
#endif // !((defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(USE_UDEV))
#endif // CHROME_BROWSER_UI_GLOBAL_MEDIA_CONTROLS_MEDIA_NOTIFICATION_DEVICE_MONITOR_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment