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

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: Merge with trunk 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options2/chromeos/internet_options_handler2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0526cd71a53e678f86da221333b19cf7c635b3d3..aba619bb65894a1027ba2a2c836fc3f50103d1f0 100644
--- a/chrome/browser/resources/options2/chromeos/network_list.js
+++ b/chrome/browser/resources/options2/chromeos/network_list.js
@@ -305,6 +305,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('refreshNetworks');
},
};
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options2/chromeos/internet_options_handler2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698