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

Unified Diff: components/proximity_auth/remote_device_life_cycle_impl.cc

Issue 2805113002: [CrOS Tether] Make BluetoothThrottler a singleton which can be easily shared between EasyUnlock and… (Closed)
Patch Set: Created 3 years, 8 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/remote_device_life_cycle_impl.cc
diff --git a/components/proximity_auth/remote_device_life_cycle_impl.cc b/components/proximity_auth/remote_device_life_cycle_impl.cc
index 72dbb2de3a5ae9eefae959e8a99ad2fc984ac390..f6b5a78d913936ff7113efd05ec54dd2114ecc61 100644
--- a/components/proximity_auth/remote_device_life_cycle_impl.cc
+++ b/components/proximity_auth/remote_device_life_cycle_impl.cc
@@ -48,8 +48,7 @@ RemoteDeviceLifeCycleImpl::RemoteDeviceLifeCycleImpl(
proximity_auth_client_(proximity_auth_client),
state_(RemoteDeviceLifeCycle::State::STOPPED),
observers_(base::ObserverList<Observer>::NOTIFY_EXISTING_ONLY),
- bluetooth_throttler_(new cryptauth::BluetoothThrottlerImpl(
- base::WrapUnique(new base::DefaultTickClock()))),
+ bluetooth_throttler_(cryptauth::BluetoothThrottlerImpl::GetInstance()),
weak_ptr_factory_(this) {}
RemoteDeviceLifeCycleImpl::~RemoteDeviceLifeCycleImpl() {}
@@ -87,7 +86,7 @@ RemoteDeviceLifeCycleImpl::CreateConnectionFinder() {
return base::MakeUnique<BluetoothLowEnergyConnectionFinder>(
remote_device_, kBLESmartLockServiceUUID,
BluetoothLowEnergyConnectionFinder::FinderStrategy::FIND_PAIRED_DEVICE,
- nullptr, bluetooth_throttler_.get(), 3);
+ nullptr, bluetooth_throttler_, 3);
} else {
return base::MakeUnique<BluetoothConnectionFinder>(
remote_device_, device::BluetoothUUID(kClassicBluetoothServiceUUID),

Powered by Google App Engine
This is Rietveld 408576698