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

Side by Side Diff: device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc

Issue 2423793002: Remove usage of FOR_EACH_OBSERVER macro in device/ (Closed)
Patch Set: rebase Created 4 years, 2 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 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 "device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h" 5 #include "device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 delete iter->second; 189 delete iter->second;
190 properties_.erase(iter); 190 properties_.erase(iter);
191 } 191 }
192 192
193 void FakeBluetoothGattDescriptorClient::OnPropertyChanged( 193 void FakeBluetoothGattDescriptorClient::OnPropertyChanged(
194 const dbus::ObjectPath& object_path, 194 const dbus::ObjectPath& object_path,
195 const std::string& property_name) { 195 const std::string& property_name) {
196 VLOG(2) << "Descriptor property changed: " << object_path.value() << ": " 196 VLOG(2) << "Descriptor property changed: " << object_path.value() << ": "
197 << property_name; 197 << property_name;
198 198
199 FOR_EACH_OBSERVER(BluetoothGattDescriptorClient::Observer, observers_, 199 for (auto& observer : observers_)
200 GattDescriptorPropertyChanged(object_path, property_name)); 200 observer.GattDescriptorPropertyChanged(object_path, property_name);
201 } 201 }
202 202
203 void FakeBluetoothGattDescriptorClient::NotifyDescriptorAdded( 203 void FakeBluetoothGattDescriptorClient::NotifyDescriptorAdded(
204 const dbus::ObjectPath& object_path) { 204 const dbus::ObjectPath& object_path) {
205 FOR_EACH_OBSERVER(BluetoothGattDescriptorClient::Observer, observers_, 205 for (auto& observer : observers_)
206 GattDescriptorAdded(object_path)); 206 observer.GattDescriptorAdded(object_path);
207 } 207 }
208 208
209 void FakeBluetoothGattDescriptorClient::NotifyDescriptorRemoved( 209 void FakeBluetoothGattDescriptorClient::NotifyDescriptorRemoved(
210 const dbus::ObjectPath& object_path) { 210 const dbus::ObjectPath& object_path) {
211 FOR_EACH_OBSERVER(BluetoothGattDescriptorClient::Observer, observers_, 211 for (auto& observer : observers_)
212 GattDescriptorRemoved(object_path)); 212 observer.GattDescriptorRemoved(object_path);
213 } 213 }
214 214
215 } // namespace bluez 215 } // namespace bluez
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698