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

Unified Diff: device/generic_sensor/public/cpp/sensor_struct_traits.cc

Issue 2353493002: [Sensors] Allow Sensor API only on secure top-level browsing contexts and add frequency checks (Closed)
Patch Set: Comments from Tim Created 4 years, 3 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/public/cpp/sensor_struct_traits.cc
diff --git a/device/generic_sensor/public/cpp/sensor_struct_traits.cc b/device/generic_sensor/public/cpp/sensor_struct_traits.cc
index f3ce3c4a9f4ac0ae87b1bcb607a7aa1696257ef1..2a36547a38cae03b3c3932ec2bfb8b36578c2627 100644
--- a/device/generic_sensor/public/cpp/sensor_struct_traits.cc
+++ b/device/generic_sensor/public/cpp/sensor_struct_traits.cc
@@ -13,7 +13,7 @@ bool StructTraits<device::mojom::SensorConfigurationDataView,
device::PlatformSensorConfiguration* out) {
// Maximum allowed frequency is capped to 60Hz.
if (data.frequency() >
- device::PlatformSensorConfiguration::kMaxAllowedFrequency ||
+ device::mojom::SensorConfiguration::kMaxAllowedFrequency ||
data.frequency() <= 0.0) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698