Index: components/proximity_auth/proximity_monitor_impl_unittest.cc |
diff --git a/components/proximity_auth/proximity_monitor_impl_unittest.cc b/components/proximity_auth/proximity_monitor_impl_unittest.cc |
index a1784539de170f851e447a4213e08a1193056136..60e71e833a437052d0ae8b1c30a0c68de447f590 100644 |
--- a/components/proximity_auth/proximity_monitor_impl_unittest.cc |
+++ b/components/proximity_auth/proximity_monitor_impl_unittest.cc |
@@ -38,9 +38,8 @@ const char kPersistentSymmetricKey[] = "PSK"; |
class TestProximityMonitorImpl : public ProximityMonitorImpl { |
public: |
explicit TestProximityMonitorImpl(const RemoteDevice& remote_device, |
- scoped_ptr<base::TickClock> clock, |
- ProximityMonitorObserver* observer) |
- : ProximityMonitorImpl(remote_device, clock.Pass(), observer) {} |
+ scoped_ptr<base::TickClock> clock) |
+ : ProximityMonitorImpl(remote_device, clock.Pass()) {} |
~TestProximityMonitorImpl() override {} |
using ProximityMonitorImpl::SetStrategy; |
@@ -88,14 +87,14 @@ class ProximityAuthProximityMonitorImplTest : public testing::Test { |
kRemoteDevicePublicKey, |
kBluetoothAddress, |
kPersistentSymmetricKey), |
- make_scoped_ptr(clock_), |
- &observer_), |
+ make_scoped_ptr(clock_)), |
task_runner_(new base::TestSimpleTaskRunner()), |
thread_task_runner_handle_(task_runner_) { |
ON_CALL(*bluetooth_adapter_, GetDevice(kBluetoothAddress)) |
.WillByDefault(Return(&remote_bluetooth_device_)); |
ON_CALL(remote_bluetooth_device_, GetConnectionInfo(_)) |
.WillByDefault(SaveArg<0>(&connection_info_callback_)); |
+ monitor_.AddObserver(&observer_); |
} |
~ProximityAuthProximityMonitorImplTest() override {} |
@@ -541,7 +540,8 @@ TEST_F(ProximityAuthProximityMonitorImplTest, |
kPersistentSymmetricKey); |
scoped_ptr<base::TickClock> clock(new base::SimpleTestTickClock()); |
- ProximityMonitorImpl monitor(unnamed_remote_device, clock.Pass(), &observer_); |
+ ProximityMonitorImpl monitor(unnamed_remote_device, clock.Pass()); |
+ monitor.AddObserver(&observer_); |
monitor.Start(); |
ProvideConnectionInfo({127, 127, 127}); |