Index: device/bluetooth/dbus/fake_bluetooth_device_client.cc |
diff --git a/device/bluetooth/dbus/fake_bluetooth_device_client.cc b/device/bluetooth/dbus/fake_bluetooth_device_client.cc |
index 4f0243de137cf02b6c0f0cf409886aea2197b029..ae73a84fd298aeef66ee03a7e41eb0bc3936ef78 100644 |
--- a/device/bluetooth/dbus/fake_bluetooth_device_client.cc |
+++ b/device/bluetooth/dbus/fake_bluetooth_device_client.cc |
@@ -671,8 +671,7 @@ void FakeBluetoothDeviceClient::SetSimulationIntervalMs(int interval_ms) { |
void FakeBluetoothDeviceClient::CreateDevice( |
const dbus::ObjectPath& adapter_path, |
const dbus::ObjectPath& device_path) { |
- if (std::find(device_list_.begin(), device_list_.end(), device_path) != |
- device_list_.end()) |
+ if (base::ContainsValue(device_list_, device_path)) |
return; |
std::unique_ptr<Properties> properties( |
@@ -807,8 +806,7 @@ void FakeBluetoothDeviceClient::CreateDeviceWithProperties( |
const dbus::ObjectPath& adapter_path, |
const IncomingDeviceProperties& props) { |
dbus::ObjectPath device_path(props.device_path); |
- if (std::find(device_list_.begin(), device_list_.end(), device_path) != |
- device_list_.end()) |
+ if (base::ContainsValue(device_list_, device_path)) |
return; |
std::unique_ptr<Properties> properties( |
@@ -1821,8 +1819,7 @@ void FakeBluetoothDeviceClient::CreateTestDevice( |
base::Base64Encode(base::RandBytesAsString(10), &id); |
base::RemoveChars(id, "+/=", &id); |
device_path = dbus::ObjectPath(adapter_path.value() + "/dev" + id); |
- } while (std::find(device_list_.begin(), device_list_.end(), device_path) != |
- device_list_.end()); |
+ } while (base::ContainsValue(device_list_, device_path)); |
std::unique_ptr<Properties> properties( |
new Properties(base::Bind(&FakeBluetoothDeviceClient::OnPropertyChanged, |