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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp

Issue 2771893002: Move Bluetooth.Web.FunctionCall.Count UMA from browser to WebKit (Closed)
Patch Set: move Bluetooth.Web.FunctionCall.Count UMA from browser to WebKit Created 3 years, 9 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/bluetooth/Bluetooth.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp b/third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp
index a1011220fa44d60f3aedac171df5b13878dce35c..eeae382d34687206d3c63e6e7523c9f5bcbce000 100644
--- a/third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp
@@ -4,6 +4,8 @@
#include "modules/bluetooth/Bluetooth.h"
+#include <memory>
+#include <utility>
#include "bindings/core/v8/CallbackPromiseAdapter.h"
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptPromiseResolver.h"
@@ -14,14 +16,13 @@
#include "core/frame/LocalFrame.h"
#include "modules/bluetooth/BluetoothDevice.h"
#include "modules/bluetooth/BluetoothError.h"
+#include "modules/bluetooth/BluetoothMetrics.h"
#include "modules/bluetooth/BluetoothRemoteGATTCharacteristic.h"
#include "modules/bluetooth/BluetoothUUID.h"
#include "modules/bluetooth/RequestDeviceOptions.h"
#include "platform/UserGestureIndicator.h"
#include "public/platform/InterfaceProvider.h"
#include "public/platform/Platform.h"
-#include <memory>
-#include <utility>
namespace blink {
@@ -158,6 +159,8 @@ void Bluetooth::RequestDeviceCallback(
ScriptPromise Bluetooth::requestDevice(ScriptState* scriptState,
const RequestDeviceOptions& options,
ExceptionState& exceptionState) {
+ RecordWebBluetoothFunctionCall(UMAWebBluetoothFunction::REQUEST_DEVICE);
+
ExecutionContext* context = scriptState->getExecutionContext();
// If the incumbent settings object is not a secure context, reject promise

Powered by Google App Engine
This is Rietveld 408576698