Commit bc93da2f authored by tengs's avatar tengs Committed by Commit bot

Hook up AppLifeTimeManager::Observer to turn off discoverability for Smart Lock.

BUG=chromium:442831

Review URL: https://codereview.chromium.org/1017563003

Cr-Commit-Position: refs/heads/master@{#320879}
parent 966f039d
......@@ -90,11 +90,15 @@ class EasyUnlockService::BluetoothDetector
explicit BluetoothDetector(EasyUnlockService* service)
: service_(service),
weak_ptr_factory_(this) {
apps::AppLifetimeMonitorFactory::GetForProfile(service_->profile())
->AddObserver(this);
}
~BluetoothDetector() override {
if (adapter_.get())
adapter_->RemoveObserver(this);
apps::AppLifetimeMonitorFactory::GetForProfile(service_->profile())
->RemoveObserver(this);
}
void Initialize() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment