diff options
Diffstat (limited to 'device/bluetooth/bluetooth_adapter_experimental_chromeos.cc')
-rw-r--r-- | device/bluetooth/bluetooth_adapter_experimental_chromeos.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/device/bluetooth/bluetooth_adapter_experimental_chromeos.cc b/device/bluetooth/bluetooth_adapter_experimental_chromeos.cc index 5051690..6a282f3 100644 --- a/device/bluetooth/bluetooth_adapter_experimental_chromeos.cc +++ b/device/bluetooth/bluetooth_adapter_experimental_chromeos.cc @@ -8,6 +8,7 @@ #include "base/bind.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/experimental_bluetooth_adapter_client.h" #include "chromeos/dbus/experimental_bluetooth_device_client.h" @@ -253,6 +254,19 @@ void BluetoothAdapterExperimentalChromeOS::DevicePropertyChanged( property_name == properties->connected.name() || property_name == properties->uuids.name()) NotifyDeviceChanged(device_chromeos); + + // UMA connection counting + if (property_name == properties->connected.name()) { + int count = 0; + + for (DevicesMap::iterator iter = devices_.begin(); + iter != devices_.end(); ++iter) { + if (iter->second->IsConnected()) + ++count; + } + + UMA_HISTOGRAM_COUNTS_100("Bluetooth.ConnectedDeviceCount", count); + } } void BluetoothAdapterExperimentalChromeOS::InputPropertyChanged( |