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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.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/BluetoothRemoteGATTDescriptor.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.cpp
index 738be8cb23979383753c7d5583b32e006b76e08c..91362dca16bf98c2746be32bdbcdd0fa43e3947c 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.cpp
@@ -4,13 +4,14 @@
#include "modules/bluetooth/BluetoothRemoteGATTDescriptor.h"
+#include <memory>
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptPromiseResolver.h"
#include "core/dom/DOMException.h"
#include "modules/bluetooth/BluetoothError.h"
+#include "modules/bluetooth/BluetoothMetrics.h"
#include "modules/bluetooth/BluetoothRemoteGATTService.h"
#include "modules/bluetooth/BluetoothRemoteGATTUtils.h"
-#include <memory>
namespace blink {
@@ -56,6 +57,9 @@ void BluetoothRemoteGATTDescriptor::ReadValueCallback(
ScriptPromise BluetoothRemoteGATTDescriptor::readValue(
ScriptState* scriptState) {
+ RecordWebBluetoothFunctionCall(
+ UMAWebBluetoothFunction::DESCRIPTOR_READ_VALUE);
+
if (!GetGatt()->connected()) {
return ScriptPromise::rejectWithDOMException(
scriptState,
@@ -106,6 +110,9 @@ void BluetoothRemoteGATTDescriptor::WriteValueCallback(
ScriptPromise BluetoothRemoteGATTDescriptor::writeValue(
ScriptState* scriptState,
const DOMArrayPiece& value) {
+ RecordWebBluetoothFunctionCall(
+ UMAWebBluetoothFunction::DESCRIPTOR_WRITE_VALUE);
+
if (!GetGatt()->connected()) {
return ScriptPromise::rejectWithDOMException(
scriptState,

Powered by Google App Engine
This is Rietveld 408576698