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

Side by Side Diff: device/bluetooth/bluetooth_low_energy_device_mac.mm

Issue 2891493002: Revert of bluetooth: bluez: Fixed issue with missing notifications after reconnect. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_low_energy_device_mac.h" 5 #include "device/bluetooth/bluetooth_low_energy_device_mac.h"
6 6
7 #import <CoreFoundation/CoreFoundation.h> 7 #import <CoreFoundation/CoreFoundation.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 GattServiceMap gatt_services_swapped; 357 GattServiceMap gatt_services_swapped;
358 gatt_services_swapped.swap(gatt_services_); 358 gatt_services_swapped.swap(gatt_services_);
359 gatt_services_swapped.clear(); 359 gatt_services_swapped.clear();
360 device_uuids_.ClearServiceUUIDs(); 360 device_uuids_.ClearServiceUUIDs();
361 // There are two cases in which this function will be called: 361 // There are two cases in which this function will be called:
362 // 1. When the connection to the device breaks (either because 362 // 1. When the connection to the device breaks (either because
363 // we closed it or the device closed it). 363 // we closed it or the device closed it).
364 // 2. When we cancel a pending connection request. 364 // 2. When we cancel a pending connection request.
365 if (create_gatt_connection_error_callbacks_.empty()) { 365 if (create_gatt_connection_error_callbacks_.empty()) {
366 // If there are no pending callbacks then the connection broke (#1). 366 // If there are no pending callbacks then the connection broke (#1).
367 DidDisconnectGatt(true /* notifyDeviceChanged */); 367 DidDisconnectGatt();
368 return; 368 return;
369 } 369 }
370 // Else we canceled the connection request (#2). 370 // Else we canceled the connection request (#2).
371 // TODO(http://crbug.com/585897): Need to pass the error. 371 // TODO(http://crbug.com/585897): Need to pass the error.
372 DidFailToConnectGatt(BluetoothDevice::ConnectErrorCode::ERROR_FAILED); 372 DidFailToConnectGatt(BluetoothDevice::ConnectErrorCode::ERROR_FAILED);
373 } 373 }
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device_android.cc ('k') | device/bluetooth/bluez/bluetooth_device_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698