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

Unified Diff: chrome/browser/ui/bluetooth/bluetooth_chooser_controller.cc

Issue 2192953002: Chooser spinner should disappear as soon as one device shows up (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chooser spinner should disappear as soon as one device shows up Created 4 years, 5 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: chrome/browser/ui/bluetooth/bluetooth_chooser_controller.cc
diff --git a/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.cc b/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.cc
index e212a7394fd190f34f144320030d8fb7cb5471b6..29513f928b3b5ae6908f43f06c2f4ea242047104 100644
--- a/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.cc
+++ b/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.cc
@@ -152,8 +152,11 @@ void BluetoothChooserController::AddDevice(const std::string& device_id,
const base::string16& device_name) {
device_names_and_ids_.push_back(std::make_pair(device_name, device_id));
++device_name_map_[device_name];
- if (view())
+ if (view()) {
view()->OnOptionAdded(device_names_and_ids_.size() - 1);
+ if (device_names_and_ids_.size() == 1)
+ view()->OnOptionAvailableDuringRefresh();
+ }
}
void BluetoothChooserController::RemoveDevice(const std::string& device_id) {

Powered by Google App Engine
This is Rietveld 408576698