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

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

Issue 2849493002: [EasyUnlock] Fixing the setup connection finder and message format. (Closed)
Patch Set: date 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 | chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_connection_manager.h » ('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..1687167296ba1731430dae709476272ea7506d65 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,7 @@
#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/bluetooth_low_energy_setup_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 +1083,15 @@ bool EasyUnlockPrivateFindSetupConnectionFunction::RunAsync() {
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::BluetoothLowEnergySetupConnectionFinder(
+ params->setup_service_uuid,
+ cryptauth::BluetoothThrottlerImpl::GetInstance()));
+
+ 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 | chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_connection_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698