Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(678)

Unified Diff: device/generic_sensor/platform_sensor_provider.cc

Issue 2865263002: Move //device/generic_sensor to be part of the internal implementation of the Device Service. (Closed)
Patch Set: code rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/generic_sensor/platform_sensor_provider.cc
diff --git a/device/generic_sensor/platform_sensor_provider.cc b/device/generic_sensor/platform_sensor_provider.cc
deleted file mode 100644
index e7749e1805067624df7cbdb38c317bd08e0d8718..0000000000000000000000000000000000000000
--- a/device/generic_sensor/platform_sensor_provider.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2016 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 "device/generic_sensor/platform_sensor_provider.h"
-
-#if defined(OS_MACOSX)
-#include "device/generic_sensor/platform_sensor_provider_mac.h"
-#elif defined(OS_ANDROID)
-#include "device/generic_sensor/platform_sensor_provider_android.h"
-#elif defined(OS_WIN)
-#include "device/generic_sensor/platform_sensor_provider_win.h"
-#elif defined(OS_LINUX) && defined(USE_UDEV)
-#include "device/generic_sensor/platform_sensor_provider_linux.h"
-#endif
-
-namespace {
-
-static device::PlatformSensorProvider* g_provider_for_testing = nullptr;
-
-} // namespace
-
-namespace device {
-
-// static
-void PlatformSensorProvider::SetProviderForTesting(
- PlatformSensorProvider* provider) {
- g_provider_for_testing = provider;
-}
-
-// static
-PlatformSensorProvider* PlatformSensorProvider::GetInstance() {
- if (g_provider_for_testing)
- return g_provider_for_testing;
-#if defined(OS_MACOSX)
- return PlatformSensorProviderMac::GetInstance();
-#elif defined(OS_ANDROID)
- return PlatformSensorProviderAndroid::GetInstance();
-#elif defined(OS_WIN)
- return PlatformSensorProviderWin::GetInstance();
-#elif defined(OS_LINUX) && defined(USE_UDEV)
- return PlatformSensorProviderLinux::GetInstance();
-#else
- return nullptr;
-#endif
-}
-
-} // namespace device
« no previous file with comments | « device/generic_sensor/platform_sensor_provider.h ('k') | device/generic_sensor/platform_sensor_provider_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698