Index: chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h |
diff --git a/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h b/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h |
index 35becbf0630361bb1392d759fd1eaba6dca89104..a6469afc8ca7c7c22233a19ad86c3e7a3f947f76 100644 |
--- a/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h |
+++ b/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h |
@@ -48,8 +48,8 @@ class BluetoothChooserController : public ChooserController { |
void OnDiscoveryStateChanged(content::BluetoothChooser::DiscoveryState state); |
// Shows a new device in the chooser. |
juncai
2016/08/04 21:52:25
nit: update the comments.
ortuno
2016/08/05 02:16:09
Done.
|
- void AddDevice(const std::string& device_id, |
- const base::string16& device_name); |
+ void AddOrUpdateDevice(const std::string& device_id, |
+ const base::string16& device_name); |
// Tells the chooser that a device is no longer available. |
void RemoveDevice(const std::string& device_id); |
@@ -59,11 +59,12 @@ class BluetoothChooserController : public ChooserController { |
// Bluetooth adapter is turned on or off, or when re-scan happens. |
void ClearAllDevices(); |
- // Each pair is a (device name, device id). |
- std::vector<std::pair<base::string16, std::string>> device_names_and_ids_; |
- content::BluetoothChooser::EventHandler event_handler_; |
+ std::vector<std::string> device_ids_; |
+ std::unordered_map<std::string, base::string16> device_id_to_name_map_; |
// Maps from device name to number of devices. |
std::unordered_map<base::string16, int> device_name_map_; |
+ |
+ content::BluetoothChooser::EventHandler event_handler_; |
base::string16 no_devices_text_; |
base::string16 status_text_; |