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

Unified Diff: device/bluetooth/test/mock_bluetooth_device.cc

Issue 2567903004: Replace ScopedVector/ScopedPtrHashMap with std::vector and std::unordered_map (Closed)
Patch Set: Mac bustage Created 4 years 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: device/bluetooth/test/mock_bluetooth_device.cc
diff --git a/device/bluetooth/test/mock_bluetooth_device.cc b/device/bluetooth/test/mock_bluetooth_device.cc
index 6a3e25bbff00b7d397db8b74b9ffd0c7860fcde2..da704efebc9b2e149663f847295e0c5af4463a40 100644
--- a/device/bluetooth/test/mock_bluetooth_device.cc
+++ b/device/bluetooth/test/mock_bluetooth_device.cc
@@ -73,17 +73,17 @@ void MockBluetoothDevice::AddMockService(
std::vector<BluetoothRemoteGattService*> MockBluetoothDevice::GetMockServices()
const {
std::vector<BluetoothRemoteGattService*> services;
- for (BluetoothRemoteGattService* service : mock_services_) {
- services.push_back(service);
+ for (const auto& service : mock_services_) {
+ services.push_back(service.get());
}
return services;
}
BluetoothRemoteGattService* MockBluetoothDevice::GetMockService(
const std::string& identifier) const {
- for (BluetoothRemoteGattService* service : mock_services_) {
+ for (const auto& service : mock_services_) {
if (service->GetIdentifier() == identifier)
- return service;
+ return service.get();
}
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698