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

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

Issue 1372283002: Hook up ProximityAuthSystem in EasyUnlockService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth_connection
Patch Set: remove log Created 5 years, 3 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/bluetooth_low_energy_connection.cc
diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection.cc b/components/proximity_auth/ble/bluetooth_low_energy_connection.cc
index 52af29b32bf4fc1c35bb2133c6c32e93eb149a23..063d6de5df9c94ef4883507a8c38a48968ce0717 100644
--- a/components/proximity_auth/ble/bluetooth_low_energy_connection.cc
+++ b/components/proximity_auth/ble/bluetooth_low_energy_connection.cc
@@ -76,7 +76,6 @@ BluetoothLowEnergyConnection::BluetoothLowEnergyConnection(
}
BluetoothLowEnergyConnection::~BluetoothLowEnergyConnection() {
- PA_LOG(INFO) << "Connection destroyed.";
Disconnect();
if (adapter_) {
adapter_->RemoveObserver(this);
@@ -127,7 +126,7 @@ void BluetoothLowEnergyConnection::CreateGattConnection() {
void BluetoothLowEnergyConnection::Disconnect() {
if (sub_status() != SubStatus::DISCONNECTED) {
- ClearWriteRequestsQueue();
+ weak_ptr_factory_.InvalidateWeakPtrs();
StopNotifySession();
characteristic_finder_.reset();
if (gatt_connection_) {
@@ -318,8 +317,7 @@ BluetoothLowEnergyConnection::WriteRequest::WriteRequest(
number_of_failed_attempts(0) {
}
-BluetoothLowEnergyConnection::WriteRequest::~WriteRequest() {
-}
+BluetoothLowEnergyConnection::WriteRequest::~WriteRequest() {}
void BluetoothLowEnergyConnection::CompleteConnection() {
PA_LOG(INFO) << "Connection completed. Time elapsed: "
@@ -535,11 +533,6 @@ BluetoothLowEnergyConnection::BuildWriteRequest(
return WriteRequest(value, is_last_write_for_wire_message);
}
-void BluetoothLowEnergyConnection::ClearWriteRequestsQueue() {
- while (!write_requests_queue_.empty())
- write_requests_queue_.pop();
-}
-
void BluetoothLowEnergyConnection::PrintTimeElapsed() {
PA_LOG(INFO) << "Time elapsed: " << base::TimeTicks::Now() - start_time_;
}

Powered by Google App Engine
This is Rietveld 408576698