diff options
-rw-r--r-- | chrome/browser/metrics/metrics_log_chromeos.cc | 18 | ||||
-rw-r--r-- | chrome/browser/metrics/metrics_log_unittest.cc | 143 | ||||
-rw-r--r-- | chrome/common/metrics/proto/system_profile.proto | 18 | ||||
-rw-r--r-- | device/bluetooth/bluetooth_chromeos_unittest.cc | 6 | ||||
-rw-r--r-- | device/bluetooth/bluetooth_device.h | 13 | ||||
-rw-r--r-- | device/bluetooth/bluetooth_device_chromeos.cc | 44 | ||||
-rw-r--r-- | device/bluetooth/bluetooth_device_chromeos.h | 1 | ||||
-rw-r--r-- | device/bluetooth/bluetooth_device_mac.h | 1 | ||||
-rw-r--r-- | device/bluetooth/bluetooth_device_mac.mm | 5 | ||||
-rw-r--r-- | device/bluetooth/bluetooth_device_win.cc | 5 | ||||
-rw-r--r-- | device/bluetooth/bluetooth_device_win.h | 1 | ||||
-rw-r--r-- | device/bluetooth/test/mock_bluetooth_device.h | 1 |
12 files changed, 235 insertions, 21 deletions
diff --git a/chrome/browser/metrics/metrics_log_chromeos.cc b/chrome/browser/metrics/metrics_log_chromeos.cc index cc1adee..a33e9c8 100644 --- a/chrome/browser/metrics/metrics_log_chromeos.cc +++ b/chrome/browser/metrics/metrics_log_chromeos.cc @@ -146,9 +146,12 @@ void MetricsLogChromeOS::WriteBluetoothProto() { device::BluetoothAdapter::DeviceList devices = adapter_->GetDevices(); for (device::BluetoothAdapter::DeviceList::iterator iter = devices.begin(); iter != devices.end(); ++iter) { - PairedDevice* paired_device = bluetooth->add_paired_device(); - device::BluetoothDevice* device = *iter; + // Don't collect information about LE devices yet. + if (!device->IsPaired()) + continue; + + PairedDevice* paired_device = bluetooth->add_paired_device(); paired_device->set_bluetooth_class(device->GetBluetoothClass()); paired_device->set_type(AsBluetoothDeviceType(device->GetDeviceType())); @@ -167,6 +170,17 @@ void MetricsLogChromeOS::WriteBluetoothProto() { paired_device->set_vendor_prefix(vendor_prefix); } + switch (device->GetVendorIDSource()) { + case device::BluetoothDevice::VENDOR_ID_BLUETOOTH: + paired_device->set_vendor_id_source(PairedDevice::VENDOR_ID_BLUETOOTH); + break; + case device::BluetoothDevice::VENDOR_ID_USB: + paired_device->set_vendor_id_source(PairedDevice::VENDOR_ID_USB); + break; + default: + paired_device->set_vendor_id_source(PairedDevice::VENDOR_ID_UNKNOWN); + } + paired_device->set_vendor_id(device->GetVendorID()); paired_device->set_product_id(device->GetProductID()); paired_device->set_device_id(device->GetDeviceID()); diff --git a/chrome/browser/metrics/metrics_log_unittest.cc b/chrome/browser/metrics/metrics_log_unittest.cc index 0168a29..443db57 100644 --- a/chrome/browser/metrics/metrics_log_unittest.cc +++ b/chrome/browser/metrics/metrics_log_unittest.cc @@ -42,6 +42,22 @@ #include "chrome/browser/chromeos/login/fake_user_manager.h" #include "chrome/browser/chromeos/login/user_manager.h" #include "chrome/browser/metrics/metrics_log_chromeos.h" +#include "chromeos/dbus/fake_bluetooth_adapter_client.h" +#include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" +#include "chromeos/dbus/fake_bluetooth_device_client.h" +#include "chromeos/dbus/fake_bluetooth_input_client.h" +#include "chromeos/dbus/fake_dbus_thread_manager.h" + +using chromeos::DBusThreadManager; +using chromeos::BluetoothAdapterClient; +using chromeos::BluetoothAgentManagerClient; +using chromeos::BluetoothDeviceClient; +using chromeos::BluetoothInputClient; +using chromeos::FakeBluetoothAdapterClient; +using chromeos::FakeBluetoothAgentManagerClient; +using chromeos::FakeBluetoothDeviceClient; +using chromeos::FakeBluetoothInputClient; +using chromeos::FakeDBusThreadManager; #endif // OS_CHROMEOS using base::TimeDelta; @@ -97,11 +113,6 @@ class TestMetricsLogChromeOS : public MetricsLogChromeOS { metrics::ChromeUserMetricsExtension* uma_proto) : MetricsLogChromeOS(uma_proto) { } - - protected: - // Don't touch bluetooth information, as it won't be correctly initialized. - virtual void WriteBluetoothProto() OVERRIDE { - } }; #endif // OS_CHROMEOS @@ -202,6 +213,32 @@ class MetricsLogTest : public testing::Test { #if defined(OS_CHROMEOS) // Enable multi-profiles. CommandLine::ForCurrentProcess()->AppendSwitch(switches::kMultiProfiles); + + // Set up the fake Bluetooth environment, + scoped_ptr<FakeDBusThreadManager> fake_dbus_thread_manager( + new FakeDBusThreadManager); + fake_dbus_thread_manager->SetBluetoothAdapterClient( + scoped_ptr<BluetoothAdapterClient>(new FakeBluetoothAdapterClient)); + fake_dbus_thread_manager->SetBluetoothDeviceClient( + scoped_ptr<BluetoothDeviceClient>(new FakeBluetoothDeviceClient)); + fake_dbus_thread_manager->SetBluetoothInputClient( + scoped_ptr<BluetoothInputClient>(new FakeBluetoothInputClient)); + fake_dbus_thread_manager->SetBluetoothAgentManagerClient( + scoped_ptr<BluetoothAgentManagerClient>( + new FakeBluetoothAgentManagerClient)); + DBusThreadManager::InitializeForTesting(fake_dbus_thread_manager.release()); + + // Grab pointers to members of the thread manager for easier testing. + fake_bluetooth_adapter_client_ = static_cast<FakeBluetoothAdapterClient*>( + DBusThreadManager::Get()->GetBluetoothAdapterClient()); + fake_bluetooth_device_client_ = static_cast<FakeBluetoothDeviceClient*>( + DBusThreadManager::Get()->GetBluetoothDeviceClient()); +#endif // OS_CHROMEOS + } + + virtual void TearDown() OVERRIDE { +#if defined(OS_CHROMEOS) + DBusThreadManager::Shutdown(); #endif // OS_CHROMEOS } @@ -244,6 +281,12 @@ class MetricsLogTest : public testing::Test { // of this call. } + protected: +#if defined(OS_CHROMEOS) + FakeBluetoothAdapterClient* fake_bluetooth_adapter_client_; + FakeBluetoothDeviceClient* fake_bluetooth_device_client_; +#endif // OS_CHROMEOS + private: content::TestBrowserThreadBundle thread_bundle_; @@ -597,4 +640,94 @@ TEST_F(MetricsLogTest, MultiProfileCountInvalidated) { GoogleUpdateMetrics(), synthetic_trials); EXPECT_EQ(0u, log.system_profile().multi_profile_user_count()); } + +TEST_F(MetricsLogTest, BluetoothHardwareDisabled) { + TestMetricsLog log(kClientId, kSessionId); + log.RecordEnvironment(std::vector<content::WebPluginInfo>(), + GoogleUpdateMetrics(), + std::vector<chrome_variations::ActiveGroupId>()); + + EXPECT_TRUE(log.system_profile().has_hardware()); + EXPECT_TRUE(log.system_profile().hardware().has_bluetooth()); + + EXPECT_TRUE(log.system_profile().hardware().bluetooth().is_present()); + EXPECT_FALSE(log.system_profile().hardware().bluetooth().is_enabled()); +} + +TEST_F(MetricsLogTest, BluetoothHardwareEnabled) { + FakeBluetoothAdapterClient::Properties* properties = + fake_bluetooth_adapter_client_->GetProperties( + dbus::ObjectPath(FakeBluetoothAdapterClient::kAdapterPath)); + properties->powered.ReplaceValue(true); + + TestMetricsLog log(kClientId, kSessionId); + log.RecordEnvironment(std::vector<content::WebPluginInfo>(), + GoogleUpdateMetrics(), + std::vector<chrome_variations::ActiveGroupId>()); + + EXPECT_TRUE(log.system_profile().has_hardware()); + EXPECT_TRUE(log.system_profile().hardware().has_bluetooth()); + + EXPECT_TRUE(log.system_profile().hardware().bluetooth().is_present()); + EXPECT_TRUE(log.system_profile().hardware().bluetooth().is_enabled()); +} + +TEST_F(MetricsLogTest, BluetoothPairedDevices) { + // The fake bluetooth adapter class already claims to be paired with one + // device when initialized. Add a second and third fake device to it so we + // can test the cases where a device is not paired (LE device, generally) + // and a device that does not have Device ID information. + fake_bluetooth_device_client_->CreateDevice( + dbus::ObjectPath(FakeBluetoothAdapterClient::kAdapterPath), + dbus::ObjectPath(FakeBluetoothDeviceClient::kRequestPinCodePath)); + + fake_bluetooth_device_client_->CreateDevice( + dbus::ObjectPath(FakeBluetoothAdapterClient::kAdapterPath), + dbus::ObjectPath(FakeBluetoothDeviceClient::kConfirmPasskeyPath)); + + FakeBluetoothDeviceClient::Properties* properties = + fake_bluetooth_device_client_->GetProperties( + dbus::ObjectPath(FakeBluetoothDeviceClient::kConfirmPasskeyPath)); + properties->paired.ReplaceValue(true); + + TestMetricsLog log(kClientId, kSessionId); + log.RecordEnvironment(std::vector<content::WebPluginInfo>(), + GoogleUpdateMetrics(), + std::vector<chrome_variations::ActiveGroupId>()); + + ASSERT_TRUE(log.system_profile().has_hardware()); + ASSERT_TRUE(log.system_profile().hardware().has_bluetooth()); + + // Only two of the devices should appear. + EXPECT_EQ(2, + log.system_profile().hardware().bluetooth().paired_device_size()); + + typedef metrics::SystemProfileProto::Hardware::Bluetooth::PairedDevice + PairedDevice; + + // First device should match the Paired Device object, complete with + // parsed Device ID information. + PairedDevice device1 = + log.system_profile().hardware().bluetooth().paired_device(0); + + EXPECT_EQ(FakeBluetoothDeviceClient::kPairedDeviceClass, + device1.bluetooth_class()); + EXPECT_EQ(PairedDevice::DEVICE_COMPUTER, device1.type()); + EXPECT_EQ(0x001122U, device1.vendor_prefix()); + EXPECT_EQ(PairedDevice::VENDOR_ID_USB, device1.vendor_id_source()); + EXPECT_EQ(0x05ACU, device1.vendor_id()); + EXPECT_EQ(0x030DU, device1.product_id()); + EXPECT_EQ(0x0306U, device1.device_id()); + + // Second device should match the Confirm Passkey object, this has + // no Device ID information. + PairedDevice device2 = + log.system_profile().hardware().bluetooth().paired_device(1); + + EXPECT_EQ(FakeBluetoothDeviceClient::kConfirmPasskeyClass, + device2.bluetooth_class()); + EXPECT_EQ(PairedDevice::DEVICE_PHONE, device2.type()); + EXPECT_EQ(0x207D74U, device2.vendor_prefix()); + EXPECT_EQ(PairedDevice::VENDOR_ID_UNKNOWN, device2.vendor_id_source()); +} #endif // OS_CHROMEOS diff --git a/chrome/common/metrics/proto/system_profile.proto b/chrome/common/metrics/proto/system_profile.proto index 9363f2d..18f3534 100644 --- a/chrome/common/metrics/proto/system_profile.proto +++ b/chrome/common/metrics/proto/system_profile.proto @@ -206,6 +206,24 @@ message SystemProfileProto { // ie. Google's OUI (00:1A:11) is encoded as 0x00001A11 optional uint32 vendor_prefix = 4; + // The Vendor ID of a device, returned in vendor_id below, can be + // either allocated by the Bluetooth SIG or USB IF, providing two + // completely overlapping namespaces for identifiers. + // + // This field should be read along with vendor_id to correctly + // identify the vendor. For example Google is identified by either + // vendor_id_source = VENDOR_ID_BLUETOOTH, vendor_id = 0x00E0 or + // vendor_id_source = VENDOR_ID_USB, vendor_id = 0x18D1. + // + // If the device does not support the Device ID specification the + // unknown value will be set. + enum VendorIDSource { + VENDOR_ID_UNKNOWN = 0; + VENDOR_ID_BLUETOOTH = 1; + VENDOR_ID_USB = 2; + } + optional VendorIDSource vendor_id_source = 8; + // Vendor ID of the device, where available. optional uint32 vendor_id = 5; diff --git a/device/bluetooth/bluetooth_chromeos_unittest.cc b/device/bluetooth/bluetooth_chromeos_unittest.cc index de0f75d..d24ad94 100644 --- a/device/bluetooth/bluetooth_chromeos_unittest.cc +++ b/device/bluetooth/bluetooth_chromeos_unittest.cc @@ -1451,6 +1451,7 @@ TEST_F(BluetoothChromeOSTest, DeviceProperties) { EXPECT_EQ(uuids[0], "00001800-0000-1000-8000-00805f9b34fb"); EXPECT_EQ(uuids[1], "00001801-0000-1000-8000-00805f9b34fb"); + EXPECT_EQ(BluetoothDevice::VENDOR_ID_USB, devices[0]->GetVendorIDSource()); EXPECT_EQ(0x05ac, devices[0]->GetVendorID()); EXPECT_EQ(0x030d, devices[0]->GetProductID()); EXPECT_EQ(0x0306, devices[0]->GetDeviceID()); @@ -3104,6 +3105,7 @@ TEST_F(BluetoothChromeOSTest, DeviceId) { // Valid USB IF-assigned identifier. ASSERT_EQ("usb:v05ACp030Dd0306", properties->modalias.value()); + EXPECT_EQ(BluetoothDevice::VENDOR_ID_USB, device->GetVendorIDSource()); EXPECT_EQ(0x05ac, device->GetVendorID()); EXPECT_EQ(0x030d, device->GetProductID()); EXPECT_EQ(0x0306, device->GetDeviceID()); @@ -3111,6 +3113,7 @@ TEST_F(BluetoothChromeOSTest, DeviceId) { // Valid Bluetooth SIG-assigned identifier. properties->modalias.ReplaceValue("bluetooth:v00E0p2400d0400"); + EXPECT_EQ(BluetoothDevice::VENDOR_ID_BLUETOOTH, device->GetVendorIDSource()); EXPECT_EQ(0x00e0, device->GetVendorID()); EXPECT_EQ(0x2400, device->GetProductID()); EXPECT_EQ(0x0400, device->GetDeviceID()); @@ -3118,6 +3121,7 @@ TEST_F(BluetoothChromeOSTest, DeviceId) { // Invalid USB IF-assigned identifier. properties->modalias.ReplaceValue("usb:x00E0p2400d0400"); + EXPECT_EQ(BluetoothDevice::VENDOR_ID_UNKNOWN, device->GetVendorIDSource()); EXPECT_EQ(0, device->GetVendorID()); EXPECT_EQ(0, device->GetProductID()); EXPECT_EQ(0, device->GetDeviceID()); @@ -3125,6 +3129,7 @@ TEST_F(BluetoothChromeOSTest, DeviceId) { // Invalid Bluetooth SIG-assigned identifier. properties->modalias.ReplaceValue("bluetooth:x00E0p2400d0400"); + EXPECT_EQ(BluetoothDevice::VENDOR_ID_UNKNOWN, device->GetVendorIDSource()); EXPECT_EQ(0, device->GetVendorID()); EXPECT_EQ(0, device->GetProductID()); EXPECT_EQ(0, device->GetDeviceID()); @@ -3132,6 +3137,7 @@ TEST_F(BluetoothChromeOSTest, DeviceId) { // Unknown vendor specification identifier. properties->modalias.ReplaceValue("chrome:v00E0p2400d0400"); + EXPECT_EQ(BluetoothDevice::VENDOR_ID_UNKNOWN, device->GetVendorIDSource()); EXPECT_EQ(0, device->GetVendorID()); EXPECT_EQ(0, device->GetProductID()); EXPECT_EQ(0, device->GetDeviceID()); diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h index 48df49f..cb1e7ec 100644 --- a/device/bluetooth/bluetooth_device.h +++ b/device/bluetooth/bluetooth_device.h @@ -33,6 +33,15 @@ struct BluetoothOutOfBandPairingData; // for devices coming and going, as well as properties being updated. class BluetoothDevice { public: + // Possible values that may be returned by GetVendorIDSource(), + // indicating different organisations that allocate the identifiers returned + // by GetVendorID(). + enum VendorIDSource { + VENDOR_ID_UNKNOWN, + VENDOR_ID_BLUETOOTH, + VENDOR_ID_USB + }; + // Possible values that may be returned by GetDeviceType(), representing // different types of bluetooth device that we support or are aware of // decoded from the bluetooth class information. @@ -175,6 +184,10 @@ class BluetoothDevice { // a unique key to identify the device and copied where needed. virtual std::string GetAddress() const = 0; + // Returns the allocation source of the identifier returned by GetVendorID(), + // where available, or VENDOR_ID_UNKNOWN where not. + virtual VendorIDSource GetVendorIDSource() const = 0; + // Returns the Vendor ID of the device, where available. virtual uint16 GetVendorID() const = 0; diff --git a/device/bluetooth/bluetooth_device_chromeos.cc b/device/bluetooth/bluetooth_device_chromeos.cc index 27ab143..d68fd0b 100644 --- a/device/bluetooth/bluetooth_device_chromeos.cc +++ b/device/bluetooth/bluetooth_device_chromeos.cc @@ -42,28 +42,37 @@ enum UMAPairingResult { }; void ParseModalias(const dbus::ObjectPath& object_path, - uint16 *vendor_id, - uint16 *product_id, - uint16 *device_id) { + BluetoothDevice::VendorIDSource* vendor_id_source, + uint16* vendor_id, + uint16* product_id, + uint16* device_id) { chromeos::BluetoothDeviceClient::Properties* properties = chromeos::DBusThreadManager::Get()->GetBluetoothDeviceClient()-> GetProperties(object_path); DCHECK(properties); std::string modalias = properties->modalias.value(); + BluetoothDevice::VendorIDSource source_value; int vendor_value, product_value, device_value; if (sscanf(modalias.c_str(), "bluetooth:v%04xp%04xd%04x", - &vendor_value, &product_value, &device_value) == 3 || - sscanf(modalias.c_str(), "usb:v%04xp%04xd%04x", &vendor_value, &product_value, &device_value) == 3) { - if (vendor_id != NULL) - *vendor_id = vendor_value; - if (product_id != NULL) - *product_id = product_value; - if (device_id != NULL) - *device_id = device_value; + source_value = BluetoothDevice::VENDOR_ID_BLUETOOTH; + } else if (sscanf(modalias.c_str(), "usb:v%04xp%04xd%04x", + &vendor_value, &product_value, &device_value) == 3) { + source_value = BluetoothDevice::VENDOR_ID_USB; + } else { + return; } + + if (vendor_id_source != NULL) + *vendor_id_source = source_value; + if (vendor_id != NULL) + *vendor_id = vendor_value; + if (product_id != NULL) + *product_id = product_value; + if (device_id != NULL) + *device_id = device_value; } void RecordPairingResult(BluetoothDevice::ConnectErrorCode error_code) { @@ -142,21 +151,28 @@ std::string BluetoothDeviceChromeOS::GetAddress() const { return properties->address.value(); } +BluetoothDevice::VendorIDSource +BluetoothDeviceChromeOS::GetVendorIDSource() const { + VendorIDSource vendor_id_source = VENDOR_ID_UNKNOWN; + ParseModalias(object_path_, &vendor_id_source, NULL, NULL, NULL); + return vendor_id_source; +} + uint16 BluetoothDeviceChromeOS::GetVendorID() const { uint16 vendor_id = 0; - ParseModalias(object_path_, &vendor_id, NULL, NULL); + ParseModalias(object_path_, NULL, &vendor_id, NULL, NULL); return vendor_id; } uint16 BluetoothDeviceChromeOS::GetProductID() const { uint16 product_id = 0; - ParseModalias(object_path_, NULL, &product_id, NULL); + ParseModalias(object_path_, NULL, NULL, &product_id, NULL); return product_id; } uint16 BluetoothDeviceChromeOS::GetDeviceID() const { uint16 device_id = 0; - ParseModalias(object_path_, NULL, NULL, &device_id); + ParseModalias(object_path_, NULL, NULL, NULL, &device_id); return device_id; } diff --git a/device/bluetooth/bluetooth_device_chromeos.h b/device/bluetooth/bluetooth_device_chromeos.h index 797f66e..bc94c3c 100644 --- a/device/bluetooth/bluetooth_device_chromeos.h +++ b/device/bluetooth/bluetooth_device_chromeos.h @@ -26,6 +26,7 @@ class BluetoothDeviceChromeOS // BluetoothDevice override virtual uint32 GetBluetoothClass() const OVERRIDE; virtual std::string GetAddress() const OVERRIDE; + virtual VendorIDSource GetVendorIDSource() const OVERRIDE; virtual uint16 GetVendorID() const OVERRIDE; virtual uint16 GetProductID() const OVERRIDE; virtual uint16 GetDeviceID() const OVERRIDE; diff --git a/device/bluetooth/bluetooth_device_mac.h b/device/bluetooth/bluetooth_device_mac.h index bc887b9..bc3ce19 100644 --- a/device/bluetooth/bluetooth_device_mac.h +++ b/device/bluetooth/bluetooth_device_mac.h @@ -26,6 +26,7 @@ class BluetoothDeviceMac : public BluetoothDevice { // BluetoothDevice override virtual uint32 GetBluetoothClass() const OVERRIDE; virtual std::string GetAddress() const OVERRIDE; + virtual VendorIDSource GetVendorIDSource() const OVERRIDE; virtual uint16 GetVendorID() const OVERRIDE; virtual uint16 GetProductID() const OVERRIDE; virtual uint16 GetDeviceID() const OVERRIDE; diff --git a/device/bluetooth/bluetooth_device_mac.mm b/device/bluetooth/bluetooth_device_mac.mm index 39acbef..50762d2 100644 --- a/device/bluetooth/bluetooth_device_mac.mm +++ b/device/bluetooth/bluetooth_device_mac.mm @@ -82,6 +82,11 @@ std::string BluetoothDeviceMac::GetAddress() const { return base::SysNSStringToUTF8([device_ addressString]); } +BluetoothDevice::VendorIDSource +BluetoothDeviceMac::GetVendorIDSource() const { + return VENDOR_ID_UNKNOWN; +} + uint16 BluetoothDeviceMac::GetVendorID() const { return 0; } diff --git a/device/bluetooth/bluetooth_device_win.cc b/device/bluetooth/bluetooth_device_win.cc index bfd9bc6..3f95efd 100644 --- a/device/bluetooth/bluetooth_device_win.cc +++ b/device/bluetooth/bluetooth_device_win.cc @@ -71,6 +71,11 @@ std::string BluetoothDeviceWin::GetAddress() const { return address_; } +BluetoothDevice::VendorIDSource +BluetoothDeviceWin::GetVendorIDSource() const { + return VENDOR_ID_UNKNOWN; +} + uint16 BluetoothDeviceWin::GetVendorID() const { return 0; } diff --git a/device/bluetooth/bluetooth_device_win.h b/device/bluetooth/bluetooth_device_win.h index 452f6f2..274364b 100644 --- a/device/bluetooth/bluetooth_device_win.h +++ b/device/bluetooth/bluetooth_device_win.h @@ -26,6 +26,7 @@ class BluetoothDeviceWin : public BluetoothDevice { // BluetoothDevice override virtual uint32 GetBluetoothClass() const OVERRIDE; virtual std::string GetAddress() const OVERRIDE; + virtual VendorIDSource GetVendorIDSource() const OVERRIDE; virtual uint16 GetVendorID() const OVERRIDE; virtual uint16 GetProductID() const OVERRIDE; virtual uint16 GetDeviceID() const OVERRIDE; diff --git a/device/bluetooth/test/mock_bluetooth_device.h b/device/bluetooth/test/mock_bluetooth_device.h index de2907d..bc028e5 100644 --- a/device/bluetooth/test/mock_bluetooth_device.h +++ b/device/bluetooth/test/mock_bluetooth_device.h @@ -29,6 +29,7 @@ class MockBluetoothDevice : public BluetoothDevice { MOCK_CONST_METHOD0(GetBluetoothClass, uint32()); MOCK_CONST_METHOD0(GetDeviceName, std::string()); MOCK_CONST_METHOD0(GetAddress, std::string()); + MOCK_CONST_METHOD0(GetVendorIDSource, BluetoothDevice::VendorIDSource()); MOCK_CONST_METHOD0(GetVendorID, uint16()); MOCK_CONST_METHOD0(GetProductID, uint16()); MOCK_CONST_METHOD0(GetDeviceID, uint16()); |