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

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

Issue 1017433002: Add RAPPOR metric recording for Device{Orientation,Motion} in blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: merge comments in Platform.h Created 5 years, 8 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 | « no previous file | Source/modules/device_orientation/DeviceOrientationController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/device_orientation/DeviceMotionController.cpp
diff --git a/Source/modules/device_orientation/DeviceMotionController.cpp b/Source/modules/device_orientation/DeviceMotionController.cpp
index adb45324a4dc2e939c7c0bd77bef3d0247749600..86f64dca245ae51b4d9bebfd2d104a52c6edcaba 100644
--- a/Source/modules/device_orientation/DeviceMotionController.cpp
+++ b/Source/modules/device_orientation/DeviceMotionController.cpp
@@ -13,6 +13,7 @@
#include "modules/device_orientation/DeviceMotionDispatcher.h"
#include "modules/device_orientation/DeviceMotionEvent.h"
#include "platform/weborigin/SecurityOrigin.h"
+#include "public/platform/Platform.h"
namespace blink {
@@ -59,6 +60,9 @@ void DeviceMotionController::didAddEventListener(LocalDOMWindow* window, const A
}
}
+ if (!m_hasEventListener)
+ Platform::current()->recordRapporURL("DeviceSensors.DeviceMotion", WebURL(document().url()));
+
DeviceSingleWindowEventController::didAddEventListener(window, eventType);
}
« no previous file with comments | « no previous file | Source/modules/device_orientation/DeviceOrientationController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698