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

Unified Diff: components/proximity_auth/ble/proximity_auth_ble_system.cc

Issue 1116963002: Bluetooth low energy connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing debug messages Created 5 years, 7 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: components/proximity_auth/ble/proximity_auth_ble_system.cc
diff --git a/components/proximity_auth/ble/proximity_auth_ble_system.cc b/components/proximity_auth/ble/proximity_auth_ble_system.cc
index 673792d82ed51705a3fa6e6250a43bff40c46039..fdb003d432d52e56c4e74b45d010886511a9b737 100644
--- a/components/proximity_auth/ble/proximity_auth_ble_system.cc
+++ b/components/proximity_auth/ble/proximity_auth_ble_system.cc
@@ -6,8 +6,10 @@
#include "base/bind.h"
#include "base/logging.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/connection.h"
+#include "components/proximity_auth/remote_device.h"
#include "device/bluetooth/bluetooth_device.h"
#include "device/bluetooth/bluetooth_gatt_connection.h"
@@ -62,6 +64,7 @@ void ProximityAuthBleSystem::OnScreenDidUnlock(
ScreenlockBridge::LockHandler::ScreenType screen_type) {
VLOG(1) << "OnScreenDidUnlock: " << screen_type;
connection_finder_.reset();
+ connection_.reset();
msarda 2015/05/05 11:56:15 Destroy the connection before the finder. Just in
sacomoto 2015/05/06 13:47:59 Done.
};
void ProximityAuthBleSystem::OnFocusedUserChanged(const std::string& user_id) {
@@ -69,11 +72,10 @@ void ProximityAuthBleSystem::OnFocusedUserChanged(const std::string& user_id) {
};
void ProximityAuthBleSystem::OnConnectionFound(
- scoped_ptr<device::BluetoothGattConnection> connection) {
+ scoped_ptr<Connection> connection) {
VLOG(1) << "Connection found. Unlock.";
- // Close the connection as it it no longer needed.
- connection_finder_->CloseConnection(connection.Pass());
+ connection_ = connection.Pass();
msarda 2015/05/05 11:56:15 We should close the connection when the screen in
sacomoto 2015/05/06 13:47:59 There is no need to do it here. When the screen is
// Unlock the screen when a connection is found.
//

Powered by Google App Engine
This is Rietveld 408576698