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

Unified Diff: third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp

Issue 2698723002: Add rappor logging for Device Orientation on security origins different from the main frame (Closed)
Patch Set: add DEviceMotion 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: third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp
diff --git a/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp b/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp
index 2b5780e8cf9dd428452be83a1254b15fd6ad1fc5..d54772115a691629db9e6f899cb12d3416b5e3f8 100644
--- a/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp
+++ b/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp
@@ -60,10 +60,16 @@ void DeviceMotionController::didAddEventListener(
}
}
- if (!m_hasEventListener)
+ if (!m_hasEventListener) {
Platform::current()->recordRapporURL("DeviceSensors.DeviceMotion",
WebURL(document().url()));
+ if (!isSameSecurityOriginAsMainFrame()) {
+ Platform::current()->recordRapporURL(
+ "DeviceSensors.DeviceMotionCrossOrigin", WebURL(document().url()));
+ }
+ }
+
DeviceSingleWindowEventController::didAddEventListener(window, eventType);
}

Powered by Google App Engine
This is Rietveld 408576698