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

Side by Side Diff: chromeos/dbus/fake_bluetooth_gatt_descriptor_client.cc

Issue 524693002: Plug memory leaks in BluetoothGattChromeOSTest.*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698