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

Unified Diff: device/generic_sensor/platform_sensor.cc

Issue 2704123006: [Sensors] Clamp given sampling frequency to the minimum supported one (Closed)
Patch Set: rebased Created 3 years, 10 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.cc
diff --git a/device/generic_sensor/platform_sensor.cc b/device/generic_sensor/platform_sensor.cc
index ab3e1cd6b45cdbcb20ac5a4811df3e8eb1f89354..34afa2d69987ab49b01dcf8041945c523c9f0b02 100644
--- a/device/generic_sensor/platform_sensor.cc
+++ b/device/generic_sensor/platform_sensor.cc
@@ -33,6 +33,10 @@ double PlatformSensor::GetMaximumSupportedFrequency() {
return GetDefaultConfiguration().frequency();
}
+double PlatformSensor::GetMinimumSupportedFrequency() {
+ return 1.0 / (60 * 60);
+}
+
bool PlatformSensor::StartListening(Client* client,
const PlatformSensorConfiguration& config) {
DCHECK(clients_.HasObserver(client));
« no previous file with comments | « device/generic_sensor/platform_sensor.h ('k') | device/generic_sensor/public/interfaces/sensor_provider.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698