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

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

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

Powered by Google App Engine
This is Rietveld 408576698