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

Unified Diff: chrome/browser/resources/options2/chromeos/network_list.js

Issue 10175010: Force a rescan when opening the Wifi menu on the settings page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/resources/options2/chromeos/network_list.js
diff --git a/chrome/browser/resources/options2/chromeos/network_list.js b/chrome/browser/resources/options2/chromeos/network_list.js
index 4f28970ccb3f6093e1b86faf9b662bcb78215900..9d119247fa9cf602c9cd8e9e55d0e2d6bdbf7f07 100644
--- a/chrome/browser/resources/options2/chromeos/network_list.js
+++ b/chrome/browser/resources/options2/chromeos/network_list.js
@@ -309,6 +309,11 @@ cr.define('options.network', function() {
*/
showMenu: function() {
var rebuild = false;
+ // Force a rescan if opening the menu for WiFi networks to ensure the
+ // list is up to date. Networks are periodically rescanned, but depending
+ // on timing, there could be an excessive delay before the first rescan
+ // unless forced.
+ var rescan = !activeMenu_ && this.data_.key == 'wifi';
if (!this.menu_) {
rebuild = true;
var existing = $(this.getMenuName_());
@@ -329,6 +334,8 @@ cr.define('options.network', function() {
this.menu_.style.setProperty('top', top + 'px');
this.menu_.hidden = false;
}
+ if (rescan)
+ chrome.send('refreshNetworksCallback');
},
};

Powered by Google App Engine
This is Rietveld 408576698