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

Unified Diff: chrome/browser/signin/easy_unlock_service.cc

Issue 1094273003: Implementing a BLE connection finder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: chrome/browser/signin/easy_unlock_service.cc
diff --git a/chrome/browser/signin/easy_unlock_service.cc b/chrome/browser/signin/easy_unlock_service.cc
index f261a3581727b6adbf36062c9f45f6747caa33bf..a04c9bac228af9647b8964814bcb4a19cf6a559b 100644
--- a/chrome/browser/signin/easy_unlock_service.cc
+++ b/chrome/browser/signin/easy_unlock_service.cc
@@ -27,6 +27,7 @@
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
+#include "components/proximity_auth/ble/proximity_auth_ble_system.h"
#include "components/proximity_auth/switches.h"
#include "components/user_manager/user.h"
#include "device/bluetooth/bluetooth_adapter.h"
@@ -646,6 +647,13 @@ void EasyUnlockService::UpdateAppState() {
app_manager_->LoadApp();
NotifyUserUpdated();
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery) &&
+ !proximity_auth_ble_system_) {
+ proximity_auth_ble_system_.reset(
+ new proximity_auth::ProximityAuthBleSystem());
+ }
+
#if defined(OS_CHROMEOS)
if (!power_monitor_)
power_monitor_.reset(new PowerMonitor(this));
@@ -664,6 +672,7 @@ void EasyUnlockService::UpdateAppState() {
if (!bluetooth_waking_up) {
app_manager_->DisableAppIfLoaded();
ResetScreenlockState();
+ proximity_auth_ble_system_.reset();
#if defined(OS_CHROMEOS)
power_monitor_.reset();
#endif

Powered by Google App Engine
This is Rietveld 408576698