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

Side by Side Diff: device/bluetooth/bluetooth_adapter_bluez.cc

Issue 1592733002: Clear the BLE services list on disconnect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the bluetooth/getPrimaryService.html timeout issue Created 4 years, 11 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 unified diff | Download patch
OLDNEW
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 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 DCHECK_EQ(service->GetAdapter(), this); 931 DCHECK_EQ(service->GetAdapter(), this);
932 932
933 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, 933 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
934 GattServiceChanged(this, service)); 934 GattServiceChanged(this, service));
935 } 935 }
936 936
937 void BluetoothAdapterBlueZ::NotifyGattServicesDiscovered( 937 void BluetoothAdapterBlueZ::NotifyGattServicesDiscovered(
938 BluetoothDeviceBlueZ* device) { 938 BluetoothDeviceBlueZ* device) {
939 DCHECK(device->adapter_ == this); 939 DCHECK(device->adapter_ == this);
940 940
941 device->SetGattServicesDiscoveryComplete(true);
941 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, 942 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
942 GattServicesDiscovered(this, device)); 943 GattServicesDiscovered(this, device));
943 } 944 }
944 945
945 void BluetoothAdapterBlueZ::NotifyGattDiscoveryComplete( 946 void BluetoothAdapterBlueZ::NotifyGattDiscoveryComplete(
946 BluetoothRemoteGattServiceBlueZ* service) { 947 BluetoothRemoteGattServiceBlueZ* service) {
947 DCHECK_EQ(service->GetAdapter(), this); 948 DCHECK_EQ(service->GetAdapter(), this);
948 949
949 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, 950 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
950 GattDiscoveryCompleteForService(this, service)); 951 GattDiscoveryCompleteForService(this, service));
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 1505
1505 // If the queued request resulted in a pending call, then let it 1506 // If the queued request resulted in a pending call, then let it
1506 // asynchonously process the remaining queued requests once the pending 1507 // asynchonously process the remaining queued requests once the pending
1507 // call returns. 1508 // call returns.
1508 if (discovery_request_pending_) 1509 if (discovery_request_pending_)
1509 return; 1510 return;
1510 } 1511 }
1511 } 1512 }
1512 1513
1513 } // namespace bluez 1514 } // namespace bluez
OLDNEW
« no previous file with comments | « content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc ('k') | device/bluetooth/bluetooth_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698