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

Unified Diff: device/bluetooth/bluetooth_adapter.cc

Issue 2282763004: bluetooth: mac: Improve classic device discovery and update (Closed)
Patch Set: Address moar comments Created 4 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
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter.cc
diff --git a/device/bluetooth/bluetooth_adapter.cc b/device/bluetooth/bluetooth_adapter.cc
index 878d3b4c9788205c2d14cbb2c0ac985a96a5d703..1701b8083454070ad60608b29c13aea60516898d 100644
--- a/device/bluetooth/bluetooth_adapter.cc
+++ b/device/bluetooth/bluetooth_adapter.cc
@@ -122,13 +122,13 @@ const BluetoothDevice* BluetoothAdapter::GetDevice(
std::string canonicalized_address =
BluetoothDevice::CanonicalizeAddress(address);
if (canonicalized_address.empty())
- return NULL;
+ return nullptr;
DevicesMap::const_iterator iter = devices_.find(canonicalized_address);
if (iter != devices_.end())
return iter->second;
- return NULL;
+ return nullptr;
}
void BluetoothAdapter::AddPairingDelegate(
@@ -383,7 +383,7 @@ void BluetoothAdapter::RemoveTimedOutDevices() {
bool device_expired =
(base::Time::NowFromSystemTime() - last_update_time) > timeoutSec;
- VLOG(1) << "device: " << device->GetAddress()
+ VLOG(3) << "device: " << device->GetAddress()
<< ", last_update: " << last_update_time
<< ", exp: " << device_expired;
@@ -391,6 +391,8 @@ void BluetoothAdapter::RemoveTimedOutDevices() {
++it;
continue;
}
+
+ VLOG(1) << "Removing device: " << device->GetAddress();
DevicesMap::iterator next = it;
next++;
std::unique_ptr<BluetoothDevice> removed_device =
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698