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

Unified Diff: Source/modules/device_orientation/DeviceOrientationController.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 | « Source/modules/device_orientation/DeviceMotionController.cpp ('k') | public/platform/Platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/device_orientation/DeviceOrientationController.cpp
diff --git a/Source/modules/device_orientation/DeviceOrientationController.cpp b/Source/modules/device_orientation/DeviceOrientationController.cpp
index a08d7fdd2f7f7117ed4f494a16c0552c7c523f15..8336ed7463be45e7726be179c7621b6f53775657 100644
--- a/Source/modules/device_orientation/DeviceOrientationController.cpp
+++ b/Source/modules/device_orientation/DeviceOrientationController.cpp
@@ -13,6 +13,7 @@
#include "modules/device_orientation/DeviceOrientationDispatcher.h"
#include "modules/device_orientation/DeviceOrientationEvent.h"
#include "platform/weborigin/SecurityOrigin.h"
+#include "public/platform/Platform.h"
namespace blink {
@@ -66,6 +67,9 @@ void DeviceOrientationController::didAddEventListener(LocalDOMWindow* window, co
}
}
+ if (!m_hasEventListener)
+ Platform::current()->recordRapporURL("DeviceSensors.DeviceOrientation", WebURL(document().url()));
+
DeviceSingleWindowEventController::didAddEventListener(window, eventType);
}
« no previous file with comments | « Source/modules/device_orientation/DeviceMotionController.cpp ('k') | public/platform/Platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698