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

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

Issue 402303002: bluetoothLowEnergy: Send onServiceAdded after all characteristics are discovered (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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_device_chromeos.h" 5 #include "device/bluetooth/bluetooth_device_chromeos.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 DCHECK(service->GetUUID().IsValid()); 516 DCHECK(service->GetUUID().IsValid());
517 517
518 FOR_EACH_OBSERVER(device::BluetoothDevice::Observer, observers_, 518 FOR_EACH_OBSERVER(device::BluetoothDevice::Observer, observers_,
519 GattServiceAdded(this, service)); 519 GattServiceAdded(this, service));
520 } 520 }
521 521
522 void BluetoothDeviceChromeOS::GattServiceRemoved( 522 void BluetoothDeviceChromeOS::GattServiceRemoved(
523 const dbus::ObjectPath& object_path) { 523 const dbus::ObjectPath& object_path) {
524 GattServiceMap::iterator iter = gatt_services_.find(object_path.value()); 524 GattServiceMap::iterator iter = gatt_services_.find(object_path.value());
525 if (iter == gatt_services_.end()) { 525 if (iter == gatt_services_.end()) {
526 VLOG(2) << "Unknown GATT service removed: " << object_path.value(); 526 VLOG(3) << "Unknown GATT service removed: " << object_path.value();
527 return; 527 return;
528 } 528 }
529 529
530 VLOG(1) << "Removing remote GATT service from device: " << GetAddress(); 530 VLOG(1) << "Removing remote GATT service from device: " << GetAddress();
531 531
532 BluetoothRemoteGattServiceChromeOS* service = 532 BluetoothRemoteGattServiceChromeOS* service =
533 static_cast<BluetoothRemoteGattServiceChromeOS*>(iter->second); 533 static_cast<BluetoothRemoteGattServiceChromeOS*>(iter->second);
534 DCHECK(service->object_path() == object_path); 534 DCHECK(service->object_path() == object_path);
535 gatt_services_.erase(iter); 535 gatt_services_.erase(iter);
536 FOR_EACH_OBSERVER(device::BluetoothDevice::Observer, observers_, 536 FOR_EACH_OBSERVER(device::BluetoothDevice::Observer, observers_,
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 void BluetoothDeviceChromeOS::OnForgetError( 714 void BluetoothDeviceChromeOS::OnForgetError(
715 const ErrorCallback& error_callback, 715 const ErrorCallback& error_callback,
716 const std::string& error_name, 716 const std::string& error_name,
717 const std::string& error_message) { 717 const std::string& error_message) {
718 LOG(WARNING) << object_path_.value() << ": Failed to remove device: " 718 LOG(WARNING) << object_path_.value() << ": Failed to remove device: "
719 << error_name << ": " << error_message; 719 << error_name << ": " << error_message;
720 error_callback.Run(); 720 error_callback.Run();
721 } 721 }
722 722
723 } // namespace chromeos 723 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_bluetooth_gatt_service_client.cc ('k') | device/bluetooth/bluetooth_gatt_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698