Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "device/bluetooth/bluetooth_adapter_bluez.h" | 5 #include "device/bluetooth/bluetooth_adapter_bluez.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 518 property_name == properties->alias.name() || | 518 property_name == properties->alias.name() || |
| 519 property_name == properties->paired.name() || | 519 property_name == properties->paired.name() || |
| 520 property_name == properties->trusted.name() || | 520 property_name == properties->trusted.name() || |
| 521 property_name == properties->connected.name() || | 521 property_name == properties->connected.name() || |
| 522 property_name == properties->uuids.name() || | 522 property_name == properties->uuids.name() || |
| 523 property_name == properties->rssi.name() || | 523 property_name == properties->rssi.name() || |
| 524 property_name == properties->tx_power.name()) { | 524 property_name == properties->tx_power.name()) { |
| 525 NotifyDeviceChanged(device_bluez); | 525 NotifyDeviceChanged(device_bluez); |
| 526 } | 526 } |
| 527 | 527 |
| 528 if (property_name == properties->gatt_services.name()) { | 528 if ((property_name == properties->gatt_services.name()) || |
| 529 (property_name == properties->services_resolved.name() && | |
| 530 properties->services_resolved.value())) { | |
| 529 device_bluez->SetGattServicesDiscoveryComplete(true); | 531 device_bluez->SetGattServicesDiscoveryComplete(true); |
|
ortuno
2016/04/07 15:34:59
I don't think we need to keep track of the value o
vudentz
2016/04/07 17:59:33
I was wondering myself why there was two very simi
ortuno
2016/04/08 19:24:17
I think we should wait until we roll bluez again a
| |
| 530 NotifyGattServicesDiscovered(device_bluez); | 532 NotifyGattServicesDiscovered(device_bluez); |
| 531 } | 533 } |
| 532 | 534 |
| 533 // When a device becomes paired, mark it as trusted so that the user does | 535 // When a device becomes paired, mark it as trusted so that the user does |
| 534 // not need to approve every incoming connection | 536 // not need to approve every incoming connection |
| 535 if (property_name == properties->paired.name() && | 537 if (property_name == properties->paired.name() && |
| 536 properties->paired.value() && !properties->trusted.value()) { | 538 properties->paired.value() && !properties->trusted.value()) { |
| 537 device_bluez->SetTrusted(); | 539 device_bluez->SetTrusted(); |
| 538 } | 540 } |
| 539 | 541 |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1449 | 1451 |
| 1450 // If the queued request resulted in a pending call, then let it | 1452 // If the queued request resulted in a pending call, then let it |
| 1451 // asynchonously process the remaining queued requests once the pending | 1453 // asynchonously process the remaining queued requests once the pending |
| 1452 // call returns. | 1454 // call returns. |
| 1453 if (discovery_request_pending_) | 1455 if (discovery_request_pending_) |
| 1454 return; | 1456 return; |
| 1455 } | 1457 } |
| 1456 } | 1458 } |
| 1457 | 1459 |
| 1458 } // namespace bluez | 1460 } // namespace bluez |
| OLD | NEW |