Chromium Code Reviews| Index: ash/system/bluetooth/tray_bluetooth.cc |
| diff --git a/ash/system/bluetooth/tray_bluetooth.cc b/ash/system/bluetooth/tray_bluetooth.cc |
| index c635e10a4edf09d3d780a6e86f0a1a7b8f91ef32..14291d6e85b557772c5dea0c1116c1b7d26b71d9 100644 |
| --- a/ash/system/bluetooth/tray_bluetooth.cc |
| +++ b/ash/system/bluetooth/tray_bluetooth.cc |
| @@ -338,7 +338,8 @@ class BluetoothDetailedView : public TrayDetailsView, |
| // Updates UI of the clicked bluetooth device to show it is being connected |
| // or disconnected if such an operation is going to be performed underway. |
| - void UpdateClickedDevice(std::string device_id, views::View* item_container) { |
| + void UpdateClickedDevice(const std::string& device_id, |
| + views::View* item_container) { |
| base::string16 display_name; |
| if (FoundDevice(device_id, paired_not_connected_devices_, |
| &display_name)) { |
| @@ -374,7 +375,7 @@ class BluetoothDetailedView : public TrayDetailsView, |
| find = device_map_.find(sender); |
| if (find == device_map_.end()) |
| return; |
| - std::string device_id = find->second; |
| + const std::string& device_id = find->second; |
|
Daniel Erat
2015/09/21 14:12:45
this makes me nervous. if one of the methods calle
stevenjb
2015/09/22 01:16:11
+1. For this kind of minor optimization cleanup I
ki.stfu
2015/09/23 17:36:05
Done.
|
| if (FoundDevice(device_id, connecting_devices_, NULL)) |
| return; |
| UpdateClickedDevice(device_id, sender); |