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

Unified Diff: content/browser/bluetooth/web_bluetooth_service_impl.cc

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: content/browser/bluetooth/web_bluetooth_service_impl.cc
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.cc b/content/browser/bluetooth/web_bluetooth_service_impl.cc
index f4bce42599a2dbff3057cf8d3c21a28ada910e01..554a9ae6a4bef840982eda37227c99feb8a4ffd6 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl.cc
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.cc
@@ -286,7 +286,6 @@ void WebBluetoothServiceImpl::SetClient(
void WebBluetoothServiceImpl::RequestDevice(
blink::mojom::WebBluetoothRequestDeviceOptionsPtr options,
const RequestDeviceCallback& callback) {
- RecordWebBluetoothFunctionCall(UMAWebBluetoothFunction::REQUEST_DEVICE);
RecordRequestDeviceOptions(options);
if (!GetAdapter()) {
@@ -311,7 +310,6 @@ void WebBluetoothServiceImpl::RemoteServerConnect(
const WebBluetoothDeviceId& device_id,
const RemoteServerConnectCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- RecordWebBluetoothFunctionCall(UMAWebBluetoothFunction::CONNECT_GATT);
const CacheQueryResult query_result = QueryCacheForDevice(device_id);
@@ -348,8 +346,6 @@ void WebBluetoothServiceImpl::RemoteServerConnect(
void WebBluetoothServiceImpl::RemoteServerDisconnect(
const WebBluetoothDeviceId& device_id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- RecordWebBluetoothFunctionCall(
- UMAWebBluetoothFunction::REMOTE_GATT_SERVER_DISCONNECT);
if (connected_devices_->IsConnectedToDeviceWithId(device_id)) {
DVLOG(1) << "Disconnecting device: " << device_id.str();
@@ -363,10 +359,6 @@ void WebBluetoothServiceImpl::RemoteServerGetPrimaryServices(
const base::Optional<BluetoothUUID>& services_uuid,
const RemoteServerGetPrimaryServicesCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- RecordWebBluetoothFunctionCall(
- quantity == blink::mojom::WebBluetoothGATTQueryQuantity::SINGLE
- ? UMAWebBluetoothFunction::GET_PRIMARY_SERVICE
- : UMAWebBluetoothFunction::GET_PRIMARY_SERVICES);
RecordGetPrimaryServicesServices(quantity, services_uuid);
if (!allowed_devices().IsAllowedToAccessAtLeastOneService(device_id)) {
@@ -420,10 +412,6 @@ void WebBluetoothServiceImpl::RemoteServiceGetCharacteristics(
const RemoteServiceGetCharacteristicsCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- RecordWebBluetoothFunctionCall(
- quantity == blink::mojom::WebBluetoothGATTQueryQuantity::SINGLE
- ? UMAWebBluetoothFunction::SERVICE_GET_CHARACTERISTIC
- : UMAWebBluetoothFunction::SERVICE_GET_CHARACTERISTICS);
RecordGetCharacteristicsCharacteristic(quantity, characteristics_uuid);
if (characteristics_uuid &&
@@ -508,10 +496,6 @@ void WebBluetoothServiceImpl::RemoteCharacteristicGetDescriptors(
const RemoteCharacteristicGetDescriptorsCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- RecordWebBluetoothFunctionCall(
- quantity == blink::mojom::WebBluetoothGATTQueryQuantity::SINGLE
- ? UMAWebBluetoothFunction::CHARACTERISTIC_GET_DESCRIPTOR
- : UMAWebBluetoothFunction::CHARACTERISTIC_GET_DESCRIPTORS);
RecordGetDescriptorsDescriptor(quantity, descriptors_uuid);
if (descriptors_uuid &&
@@ -583,8 +567,6 @@ void WebBluetoothServiceImpl::RemoteCharacteristicReadValue(
const std::string& characteristic_instance_id,
const RemoteCharacteristicReadValueCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- RecordWebBluetoothFunctionCall(
- UMAWebBluetoothFunction::CHARACTERISTIC_READ_VALUE);
const CacheQueryResult query_result =
QueryCacheForCharacteristic(characteristic_instance_id);
@@ -619,8 +601,6 @@ void WebBluetoothServiceImpl::RemoteCharacteristicWriteValue(
const std::vector<uint8_t>& value,
const RemoteCharacteristicWriteValueCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- RecordWebBluetoothFunctionCall(
- UMAWebBluetoothFunction::CHARACTERISTIC_WRITE_VALUE);
// We perform the length check on the renderer side. So if we
// get a value with length > 512, we can assume it's a hostile
@@ -662,8 +642,6 @@ void WebBluetoothServiceImpl::RemoteCharacteristicStartNotifications(
const std::string& characteristic_instance_id,
const RemoteCharacteristicStartNotificationsCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- RecordWebBluetoothFunctionCall(
- UMAWebBluetoothFunction::CHARACTERISTIC_START_NOTIFICATIONS);
auto iter =
characteristic_id_to_notify_session_.find(characteristic_instance_id);
@@ -708,8 +686,6 @@ void WebBluetoothServiceImpl::RemoteCharacteristicStopNotifications(
const std::string& characteristic_instance_id,
const RemoteCharacteristicStopNotificationsCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- RecordWebBluetoothFunctionCall(
- UMAWebBluetoothFunction::CHARACTERISTIC_STOP_NOTIFICATIONS);
const CacheQueryResult query_result =
QueryCacheForCharacteristic(characteristic_instance_id);
@@ -735,8 +711,6 @@ void WebBluetoothServiceImpl::RemoteDescriptorReadValue(
const std::string& descriptor_instance_id,
const RemoteDescriptorReadValueCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- RecordWebBluetoothFunctionCall(
- UMAWebBluetoothFunction::DESCRIPTOR_READ_VALUE);
const CacheQueryResult query_result =
QueryCacheForDescriptor(descriptor_instance_id);
@@ -771,8 +745,6 @@ void WebBluetoothServiceImpl::RemoteDescriptorWriteValue(
const std::vector<uint8_t>& value,
const RemoteDescriptorWriteValueCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- RecordWebBluetoothFunctionCall(
- UMAWebBluetoothFunction::DESCRIPTOR_WRITE_VALUE);
// We perform the length check on the renderer side. So if we
// get a value with length > 512, we can assume it's a hostile

Powered by Google App Engine
This is Rietveld 408576698