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

Unified Diff: components/proximity_auth/proximity_monitor_impl_unittest.cc

Issue 1377313002: Revert of Hook up ProximityAuthSystem in EasyUnlockService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth_connection
Patch Set: Created 5 years, 3 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: 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 4c451896b7930fa6768ed529ea5777668af1b603..1eb2a9552d2e14b2cae6291fed4db33393d94fa8 100644
--- a/components/proximity_auth/proximity_monitor_impl_unittest.cc
+++ b/components/proximity_auth/proximity_monitor_impl_unittest.cc
@@ -38,8 +38,9 @@
class TestProximityMonitorImpl : public ProximityMonitorImpl {
public:
explicit TestProximityMonitorImpl(const RemoteDevice& remote_device,
- scoped_ptr<base::TickClock> clock)
- : ProximityMonitorImpl(remote_device, clock.Pass()) {}
+ scoped_ptr<base::TickClock> clock,
+ ProximityMonitorObserver* observer)
+ : ProximityMonitorImpl(remote_device, clock.Pass(), observer) {}
~TestProximityMonitorImpl() override {}
using ProximityMonitorImpl::SetStrategy;
@@ -89,14 +90,14 @@
kBluetoothAddress,
kPersistentSymmetricKey,
std::string()),
- make_scoped_ptr(clock_)),
+ make_scoped_ptr(clock_),
+ &observer_),
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 {}
@@ -543,8 +544,7 @@
kPersistentSymmetricKey, std::string());
scoped_ptr<base::TickClock> clock(new base::SimpleTestTickClock());
- ProximityMonitorImpl monitor(unnamed_remote_device, clock.Pass());
- monitor.AddObserver(&observer_);
+ ProximityMonitorImpl monitor(unnamed_remote_device, clock.Pass(), &observer_);
monitor.Start();
ProvideConnectionInfo({127, 127, 127});
« no previous file with comments | « components/proximity_auth/proximity_monitor_impl.cc ('k') | components/proximity_auth/remote_device_life_cycle_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698