Index: chrome/browser/metrics/chromeos_metrics_provider_unittest.cc |
diff --git a/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc b/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc |
index f47b5d90a7cad4341b3721c4e201c88584ea57b9..f6bd56589dc333024c7a29cc917f47a66eb7ef7d 100644 |
--- a/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc |
+++ b/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc |
@@ -11,19 +11,20 @@ |
#include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" |
#include "chrome/browser/metrics/chromeos_metrics_provider.h" |
#include "chromeos/dbus/dbus_thread_manager.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_gatt_characteristic_client.h" |
-#include "chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h" |
-#include "chromeos/dbus/fake_bluetooth_gatt_service_client.h" |
-#include "chromeos/dbus/fake_bluetooth_input_client.h" |
#include "chromeos/dbus/power_manager_client.h" |
#include "chromeos/login/login_state.h" |
#include "components/metrics/proto/system_profile.pb.h" |
#include "components/user_manager/user_manager.h" |
#include "content/public/test/test_browser_thread_bundle.h" |
#include "content/public/test/test_utils.h" |
+#include "device/bluetooth/dbus/bluez_dbus_manager.h" |
+#include "device/bluetooth/dbus/fake_bluetooth_adapter_client.h" |
+#include "device/bluetooth/dbus/fake_bluetooth_agent_manager_client.h" |
+#include "device/bluetooth/dbus/fake_bluetooth_device_client.h" |
+#include "device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.h" |
+#include "device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h" |
+#include "device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h" |
+#include "device/bluetooth/dbus/fake_bluetooth_input_client.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#if defined(USE_X11) |
@@ -32,20 +33,22 @@ |
using chromeos::DBusThreadManager; |
using chromeos::DBusThreadManagerSetter; |
Ilya Sherman
2015/09/23 23:18:46
nit: Please re-alphabetize
rkc
2015/09/27 07:51:56
Done.
|
-using chromeos::BluetoothAdapterClient; |
-using chromeos::BluetoothAgentManagerClient; |
-using chromeos::BluetoothDeviceClient; |
-using chromeos::BluetoothGattCharacteristicClient; |
-using chromeos::BluetoothGattDescriptorClient; |
-using chromeos::BluetoothGattServiceClient; |
-using chromeos::BluetoothInputClient; |
-using chromeos::FakeBluetoothAdapterClient; |
-using chromeos::FakeBluetoothAgentManagerClient; |
-using chromeos::FakeBluetoothDeviceClient; |
-using chromeos::FakeBluetoothGattCharacteristicClient; |
-using chromeos::FakeBluetoothGattDescriptorClient; |
-using chromeos::FakeBluetoothGattServiceClient; |
-using chromeos::FakeBluetoothInputClient; |
+using bluez::BluetoothAdapterClient; |
+using bluez::BluetoothAgentManagerClient; |
+using bluez::BluetoothDeviceClient; |
+using bluez::BluetoothGattCharacteristicClient; |
+using bluez::BluetoothGattDescriptorClient; |
+using bluez::BluetoothGattServiceClient; |
+using bluez::BluetoothInputClient; |
+using bluez::BluezDBusManager; |
+using bluez::BluezDBusManagerSetter; |
+using bluez::FakeBluetoothAdapterClient; |
+using bluez::FakeBluetoothAgentManagerClient; |
+using bluez::FakeBluetoothDeviceClient; |
+using bluez::FakeBluetoothGattCharacteristicClient; |
+using bluez::FakeBluetoothGattDescriptorClient; |
+using bluez::FakeBluetoothGattServiceClient; |
+using bluez::FakeBluetoothInputClient; |
using chromeos::PowerManagerClient; |
using chromeos::STUB_DBUS_CLIENT_IMPLEMENTATION; |
@@ -60,27 +63,31 @@ class ChromeOSMetricsProviderTest : public testing::Test { |
#endif |
// Set up the fake Bluetooth environment, |
- scoped_ptr<DBusThreadManagerSetter> dbus_setter = |
- DBusThreadManager::GetSetterForTesting(); |
- dbus_setter->SetBluetoothAdapterClient( |
+ scoped_ptr<BluezDBusManagerSetter> bluez_dbus_setter = |
+ BluezDBusManager::GetSetterForTesting(); |
+ bluez_dbus_setter->SetBluetoothAdapterClient( |
scoped_ptr<BluetoothAdapterClient>(new FakeBluetoothAdapterClient)); |
- dbus_setter->SetBluetoothDeviceClient( |
+ bluez_dbus_setter->SetBluetoothDeviceClient( |
scoped_ptr<BluetoothDeviceClient>(new FakeBluetoothDeviceClient)); |
- dbus_setter->SetBluetoothGattCharacteristicClient( |
+ bluez_dbus_setter->SetBluetoothGattCharacteristicClient( |
scoped_ptr<BluetoothGattCharacteristicClient>( |
new FakeBluetoothGattCharacteristicClient)); |
- dbus_setter->SetBluetoothGattDescriptorClient( |
+ bluez_dbus_setter->SetBluetoothGattDescriptorClient( |
scoped_ptr<BluetoothGattDescriptorClient>( |
new FakeBluetoothGattDescriptorClient)); |
- dbus_setter->SetBluetoothGattServiceClient( |
+ bluez_dbus_setter->SetBluetoothGattServiceClient( |
scoped_ptr<BluetoothGattServiceClient>( |
new FakeBluetoothGattServiceClient)); |
- dbus_setter->SetBluetoothInputClient( |
+ bluez_dbus_setter->SetBluetoothInputClient( |
scoped_ptr<BluetoothInputClient>(new FakeBluetoothInputClient)); |
- dbus_setter->SetBluetoothAgentManagerClient( |
+ bluez_dbus_setter->SetBluetoothAgentManagerClient( |
scoped_ptr<BluetoothAgentManagerClient>( |
new FakeBluetoothAgentManagerClient)); |
+ // Set up the fake Bluetooth environment, |
Ilya Sherman
2015/09/23 23:18:46
nit: Remove this comment.
rkc
2015/09/27 07:51:56
Done.
|
+ scoped_ptr<DBusThreadManagerSetter> dbus_setter = |
+ DBusThreadManager::GetSetterForTesting(); |
Ilya Sherman
2015/09/23 23:18:46
nit: Move this line below the follow comment.
rkc
2015/09/27 07:51:56
Done.
|
+ |
// Set up a PowerManagerClient instance for PerfProvider. |
dbus_setter->SetPowerManagerClient( |
scoped_ptr<PowerManagerClient>( |
@@ -88,9 +95,9 @@ class ChromeOSMetricsProviderTest : public testing::Test { |
// Grab pointers to members of the thread manager for easier testing. |
fake_bluetooth_adapter_client_ = static_cast<FakeBluetoothAdapterClient*>( |
- DBusThreadManager::Get()->GetBluetoothAdapterClient()); |
+ BluezDBusManager::Get()->GetBluetoothAdapterClient()); |
fake_bluetooth_device_client_ = static_cast<FakeBluetoothDeviceClient*>( |
- DBusThreadManager::Get()->GetBluetoothDeviceClient()); |
+ BluezDBusManager::Get()->GetBluetoothDeviceClient()); |
// Initialize the login state trackers. |
if (!chromeos::LoginState::IsInitialized()) |