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

Unified Diff: components/pairing/bluetooth_controller_pairing_controller.cc

Issue 2444753002: Reduce usage of FOR_EACH_OBSERVER macro in components/ (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: components/pairing/bluetooth_controller_pairing_controller.cc
diff --git a/components/pairing/bluetooth_controller_pairing_controller.cc b/components/pairing/bluetooth_controller_pairing_controller.cc
index 84efee00b9ea060c811638d11a30a31a675a7bd0..5ef30c9c9925a5cf6ccfc3ad68750f976c77a6e4 100644
--- a/components/pairing/bluetooth_controller_pairing_controller.cc
+++ b/components/pairing/bluetooth_controller_pairing_controller.cc
@@ -49,8 +49,8 @@ void BluetoothControllerPairingController::ChangeStage(Stage new_stage) {
return;
VLOG(1) << "ChangeStage " << new_stage;
current_stage_ = new_stage;
- FOR_EACH_OBSERVER(ControllerPairingController::Observer, observers_,
- PairingStageChanged(new_stage));
+ for (ControllerPairingController::Observer& observer : observers_)
+ observer.PairingStageChanged(new_stage);
}
void BluetoothControllerPairingController::Reset() {
@@ -76,8 +76,8 @@ void BluetoothControllerPairingController::DeviceFound(
base::ASCIIToUTF16(kDeviceNamePrefix),
base::CompareCase::INSENSITIVE_ASCII)) {
discovered_devices_.insert(device->GetAddress());
- FOR_EACH_OBSERVER(ControllerPairingController::Observer, observers_,
- DiscoveredDevicesListChanged());
+ for (ControllerPairingController::Observer& observer : observers_)
+ observer.DiscoveredDevicesListChanged();
}
}
@@ -89,8 +89,8 @@ void BluetoothControllerPairingController::DeviceLost(
discovered_devices_.find(device->GetAddress());
if (ix != discovered_devices_.end()) {
discovered_devices_.erase(ix);
- FOR_EACH_OBSERVER(ControllerPairingController::Observer, observers_,
- DiscoveredDevicesListChanged());
+ for (ControllerPairingController::Observer& observer : observers_)
+ observer.DiscoveredDevicesListChanged();
}
}
« no previous file with comments | « components/omnibox/browser/shortcuts_backend.cc ('k') | components/pairing/bluetooth_host_pairing_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698