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

Unified Diff: third_party/WebKit/Source/modules/sensor/SensorProxy.cpp

Issue 2885373002: [Sensors] Simplify calculation of the reporting period (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/SensorProxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
diff --git a/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp b/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
index a4087b399489f35c1bad22660326842d1f49c069..cf0348f71c344ce6c4e161c149e5d1893b50f58e 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
+++ b/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
@@ -123,10 +123,11 @@ void SensorProxy::UpdateSensorReading() {
}
if (reading_.timestamp != reading_data.timestamp) {
+ DCHECK_GT(reading_data.timestamp, reading_.timestamp)
+ << "Timestamps must increase monotonically";
reading_ = reading_data;
- double now = WTF::MonotonicallyIncreasingTime();
for (Observer* observer : observers_)
- observer->OnSensorReadingChanged(now);
+ observer->OnSensorReadingChanged();
}
}
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/SensorProxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698