OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h" | 5 #include "chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "third_party/cros_system_api/dbus/service_constants.h" | 9 #include "third_party/cros_system_api/dbus/service_constants.h" |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 } | 49 } |
50 | 50 |
51 FakeBluetoothGattDescriptorClient::DescriptorData::~DescriptorData() { | 51 FakeBluetoothGattDescriptorClient::DescriptorData::~DescriptorData() { |
52 } | 52 } |
53 | 53 |
54 FakeBluetoothGattDescriptorClient::FakeBluetoothGattDescriptorClient() | 54 FakeBluetoothGattDescriptorClient::FakeBluetoothGattDescriptorClient() |
55 : weak_ptr_factory_(this) { | 55 : weak_ptr_factory_(this) { |
56 } | 56 } |
57 | 57 |
58 FakeBluetoothGattDescriptorClient::~FakeBluetoothGattDescriptorClient() { | 58 FakeBluetoothGattDescriptorClient::~FakeBluetoothGattDescriptorClient() { |
| 59 for(PropertiesMap::iterator iter = properties_.begin(); iter != |
| 60 properties_.end(); iter++) |
| 61 delete iter->second; |
59 } | 62 } |
60 | 63 |
61 void FakeBluetoothGattDescriptorClient::Init(dbus::Bus* bus) { | 64 void FakeBluetoothGattDescriptorClient::Init(dbus::Bus* bus) { |
62 } | 65 } |
63 | 66 |
64 void FakeBluetoothGattDescriptorClient::AddObserver(Observer* observer) { | 67 void FakeBluetoothGattDescriptorClient::AddObserver(Observer* observer) { |
65 observers_.AddObserver(observer); | 68 observers_.AddObserver(observer); |
66 } | 69 } |
67 | 70 |
68 void FakeBluetoothGattDescriptorClient::RemoveObserver(Observer* observer) { | 71 void FakeBluetoothGattDescriptorClient::RemoveObserver(Observer* observer) { |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 GattDescriptorAdded(object_path)); | 191 GattDescriptorAdded(object_path)); |
189 } | 192 } |
190 | 193 |
191 void FakeBluetoothGattDescriptorClient::NotifyDescriptorRemoved( | 194 void FakeBluetoothGattDescriptorClient::NotifyDescriptorRemoved( |
192 const dbus::ObjectPath& object_path) { | 195 const dbus::ObjectPath& object_path) { |
193 FOR_EACH_OBSERVER(BluetoothGattDescriptorClient::Observer, observers_, | 196 FOR_EACH_OBSERVER(BluetoothGattDescriptorClient::Observer, observers_, |
194 GattDescriptorRemoved(object_path)); | 197 GattDescriptorRemoved(object_path)); |
195 } | 198 } |
196 | 199 |
197 } // namespace chromeos | 200 } // namespace chromeos |
OLD | NEW |