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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.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/BluetoothRemoteGATTService.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
index 0975449e8436330c06d1d2b7b34b329fafa4afd5..7787c93088c881b31f62daf48b9c0640b39e5a66 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
@@ -4,6 +4,7 @@
#include "modules/bluetooth/BluetoothRemoteGATTService.h"
+#include <utility>
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptPromiseResolver.h"
#include "core/dom/DOMException.h"
@@ -11,10 +12,10 @@
#include "core/inspector/ConsoleMessage.h"
#include "modules/bluetooth/Bluetooth.h"
#include "modules/bluetooth/BluetoothError.h"
+#include "modules/bluetooth/BluetoothMetrics.h"
#include "modules/bluetooth/BluetoothRemoteGATTCharacteristic.h"
#include "modules/bluetooth/BluetoothUUID.h"
#include "wtf/PtrUtil.h"
-#include <utility>
namespace blink {
@@ -89,6 +90,9 @@ ScriptPromise BluetoothRemoteGATTService::getCharacteristic(
ScriptState* scriptState,
const StringOrUnsignedLong& characteristic,
ExceptionState& exceptionState) {
+ RecordWebBluetoothFunctionCall(
+ UMAWebBluetoothFunction::SERVICE_GET_CHARACTERISTIC);
+
String characteristicUUID =
BluetoothUUID::getCharacteristic(characteristic, exceptionState);
if (exceptionState.hadException())
@@ -103,6 +107,9 @@ ScriptPromise BluetoothRemoteGATTService::getCharacteristics(
ScriptState* scriptState,
const StringOrUnsignedLong& characteristic,
ExceptionState& exceptionState) {
+ RecordWebBluetoothFunctionCall(
+ UMAWebBluetoothFunction::SERVICE_GET_CHARACTERISTICS);
+
String characteristicUUID =
BluetoothUUID::getCharacteristic(characteristic, exceptionState);
if (exceptionState.hadException())
@@ -116,6 +123,9 @@ ScriptPromise BluetoothRemoteGATTService::getCharacteristics(
ScriptPromise BluetoothRemoteGATTService::getCharacteristics(
ScriptState* scriptState,
ExceptionState&) {
+ RecordWebBluetoothFunctionCall(
+ UMAWebBluetoothFunction::SERVICE_GET_CHARACTERISTICS);
+
return GetCharacteristicsImpl(
scriptState, mojom::blink::WebBluetoothGATTQueryQuantity::MULTIPLE);
}

Powered by Google App Engine
This is Rietveld 408576698