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

Unified Diff: device/sensors/data_fetcher_shared_memory_default.cc

Issue 2845763002: Remove DeviceLightEvent implementation (Closed)
Patch Set: same as previous patch Created 3 years, 8 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/sensors/data_fetcher_shared_memory_default.cc
diff --git a/device/sensors/data_fetcher_shared_memory_default.cc b/device/sensors/data_fetcher_shared_memory_default.cc
index 31bbd7a19012bad4aa0b88dfd48063f82a878b3d..12eeaaf9d02a80cc8c3c6b9354d5fb8fedc8a3b2 100644
--- a/device/sensors/data_fetcher_shared_memory_default.cc
+++ b/device/sensors/data_fetcher_shared_memory_default.cc
@@ -28,15 +28,6 @@ bool SetOrientationBuffer(device::DeviceOrientationHardwareBuffer* buffer,
return true;
}
-bool SetLightBuffer(device::DeviceLightHardwareBuffer* buffer, double lux) {
- if (!buffer)
- return false;
- buffer->seqlock.WriteBegin();
- buffer->data.value = lux;
- buffer->seqlock.WriteEnd();
- return true;
-}
-
} // namespace
namespace device {
@@ -63,10 +54,6 @@ bool DataFetcherSharedMemory::Start(ConsumerType consumer_type, void* buffer) {
orientation_absolute_buffer_ =
static_cast<DeviceOrientationHardwareBuffer*>(buffer);
return SetOrientationBuffer(orientation_absolute_buffer_, true);
- case CONSUMER_TYPE_LIGHT:
- light_buffer_ = static_cast<DeviceLightHardwareBuffer*>(buffer);
- return SetLightBuffer(light_buffer_,
- std::numeric_limits<double>::infinity());
default:
NOTREACHED();
}
@@ -81,8 +68,6 @@ bool DataFetcherSharedMemory::Stop(ConsumerType consumer_type) {
return SetOrientationBuffer(orientation_buffer_, false);
case CONSUMER_TYPE_ORIENTATION_ABSOLUTE:
return SetOrientationBuffer(orientation_absolute_buffer_, false);
- case CONSUMER_TYPE_LIGHT:
- return SetLightBuffer(light_buffer_, -1);
default:
NOTREACHED();
}
« no previous file with comments | « device/sensors/data_fetcher_shared_memory_chromeos.cc ('k') | device/sensors/data_fetcher_shared_memory_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698