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

Unified Diff: device/generic_sensor/public/cpp/platform_sensor_configuration.h

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/platform_sensor_configuration.h
diff --git a/device/generic_sensor/public/cpp/platform_sensor_configuration.h b/device/generic_sensor/public/cpp/platform_sensor_configuration.h
index b8fe00057678e7b1d996faa62a1e5bc8c7be111e..0e08e452b6fe8e4060d0c57726dff68325c28d61 100644
--- a/device/generic_sensor/public/cpp/platform_sensor_configuration.h
+++ b/device/generic_sensor/public/cpp/platform_sensor_configuration.h
@@ -22,15 +22,9 @@ class PlatformSensorConfiguration {
// used to compare two configurations.
virtual bool operator>(const PlatformSensorConfiguration& other) const;
- void set_frequency(double frequency) {
- DCHECK(frequency_ <= kMaxAllowedFrequency && frequency_ > 0.0);
- frequency_ = frequency;
- }
-
+ void set_frequency(double frequency);
double frequency() const { return frequency_; }
- static constexpr double kMaxAllowedFrequency = 60.0;
-
private:
double frequency_ = 1.0; // 1 Hz by default.
};

Powered by Google App Engine
This is Rietveld 408576698