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

Unified Diff: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc

Issue 2845473002: Revert of [EasyUnlock] Update BluetoothLowEnergyConnectionFinder to look for EIDs. (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
« no previous file with comments | « no previous file | components/proximity_auth/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc
diff --git a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc
index a9ee70105f7ecbc3fcf038fa6c5ffa786f5592fb..c750cb07460439e2a22eb15a33c0495b9c6657e0 100644
--- a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc
+++ b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc
@@ -37,7 +37,8 @@
#include "components/cryptauth/proto/cryptauth_api.pb.h"
#include "components/cryptauth/remote_device.h"
#include "components/cryptauth/secure_message_delegate.h"
-#include "components/proximity_auth/bluetooth_low_energy_connection_finder.h"
+#include "components/proximity_auth/ble/bluetooth_low_energy_connection.h"
+#include "components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h"
#include "components/proximity_auth/bluetooth_util.h"
#include "components/proximity_auth/logging/logging.h"
#include "components/proximity_auth/proximity_auth_client.h"
@@ -1083,7 +1084,16 @@
easy_unlock_private::FindSetupConnection::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params);
- // TODO(tengs): Reimplement scanning for the remote device.
+ // Creates a BLE connection finder to look for any device advertising
+ // |params->setup_service_uuid|.
+ connection_finder_.reset(
+ new proximity_auth::BluetoothLowEnergyConnectionFinder(
+ cryptauth::RemoteDevice(), params->setup_service_uuid,
+ proximity_auth::BluetoothLowEnergyConnectionFinder::FIND_ANY_DEVICE,
+ nullptr, cryptauth::BluetoothThrottlerImpl::GetInstance(), 3));
+
+ connection_finder_->Find(base::Bind(
+ &EasyUnlockPrivateFindSetupConnectionFunction::OnConnectionFound, this));
timer_.reset(new base::OneShotTimer());
timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(params->time_out),
« no previous file with comments | « no previous file | components/proximity_auth/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698