Commit 4177bddf authored by Toni Barzic's avatar Toni Barzic Committed by Commit Bot

User ReturnLater in EasyUnlockPrivateFindSetupConnectionFunction

The function implementation always returns asynchronously - either via
an delayed task, or  BluetoothLowEnergyConnectionFinder::Find callback,
which is run from InvokeCallbackAsync

BUG=829182

Change-Id: Id85b4b13fba166d10690eb258d034aab75a46b24
Reviewed-on: https://chromium-review.googlesource.com/1022372Reviewed-by: default avatarJames Hawkins <jhawkins@chromium.org>
Commit-Queue: Toni Barzic <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553716}
parent 1bb6e15c
...@@ -398,21 +398,20 @@ EasyUnlockPrivateFindSetupConnectionFunction::Run() { ...@@ -398,21 +398,20 @@ EasyUnlockPrivateFindSetupConnectionFunction::Run() {
// Creates a BLE connection finder to look for any device advertising // Creates a BLE connection finder to look for any device advertising
// |params->setup_service_uuid|. // |params->setup_service_uuid|.
connection_finder_.reset( connection_finder_ =
new proximity_auth::BluetoothLowEnergySetupConnectionFinder( std::make_unique<proximity_auth::BluetoothLowEnergySetupConnectionFinder>(
params->setup_service_uuid)); params->setup_service_uuid);
connection_finder_->Find(base::Bind( connection_finder_->Find(base::Bind(
&EasyUnlockPrivateFindSetupConnectionFunction::OnConnectionFound, this)); &EasyUnlockPrivateFindSetupConnectionFunction::OnConnectionFound, this));
timer_.reset(new base::OneShotTimer()); timer_ = std::make_unique<base::OneShotTimer>();
timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(params->time_out), timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(params->time_out),
base::Bind(&EasyUnlockPrivateFindSetupConnectionFunction:: base::Bind(&EasyUnlockPrivateFindSetupConnectionFunction::
OnConnectionFinderTimedOut, OnConnectionFinderTimedOut,
this)); this));
// TODO(https://crbug.com/829182): Resolve this. return RespondLater();
return did_respond() ? AlreadyResponded() : RespondLater();
} }
EasyUnlockPrivateSetupConnectionDisconnectFunction:: EasyUnlockPrivateSetupConnectionDisconnectFunction::
......
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