Index: chrome/browser/chromeos/dom_ui/internet_options_handler.cc |
diff --git a/chrome/browser/chromeos/dom_ui/internet_options_handler.cc b/chrome/browser/chromeos/dom_ui/internet_options_handler.cc |
index 1b37ceadaa14506277ab47645ea9ead226e5723e..51ae165ea03c64d4644d6c81b491bfda3635d025 100644 |
--- a/chrome/browser/chromeos/dom_ui/internet_options_handler.cc |
+++ b/chrome/browser/chromeos/dom_ui/internet_options_handler.cc |
@@ -1004,9 +1004,28 @@ ListValue* InternetOptionsHandler::GetRememberedList() { |
const chromeos::WifiNetworkVector& wifi_networks = |
cros->remembered_wifi_networks(); |
+ const chromeos::WifiNetworkVector& live_wifi_networks = |
+ cros->wifi_networks(); |
stevenjb
2011/01/21 17:11:18
Since we don't use "live_wifi_networks" elsewhere
|
+ |
for (chromeos::WifiNetworkVector::const_iterator it = |
wifi_networks.begin(); it != wifi_networks.end(); ++it) { |
Charlie Lee
2011/01/21 19:21:09
I would recommend instead of doing this in a doubl
|
- SkBitmap icon = *rb.GetBitmapNamed(IDR_STATUSBAR_NETWORK_BARS0_BLACK); |
+ // The remembered networks from libcros/flimflam don't include the signal |
+ // strength. So, if this remembered network has the same name (SSID) as a |
+ // live one, use the live one's signal strength. |
+ chromeos::WifiNetworkVector::const_iterator lit = |
+ live_wifi_networks.begin(); |
+ for ( ; lit != live_wifi_networks.end(); ++lit) { |
+ if ((*it)->name() == (*lit)->name()) |
+ break; |
stevenjb
2011/01/21 17:11:18
Need to compare both name() and encryption(). We s
|
+ } |
+ // Don't show active network in the remembered list. |
+ if (lit != live_wifi_networks.end() && (*lit)->connected()) |
+ continue; |
+ SkBitmap icon; |
+ if (lit == live_wifi_networks.end()) |
+ icon = *rb.GetBitmapNamed(IDR_STATUSBAR_NETWORK_BARS0_BLACK); |
+ else |
+ icon = chromeos::NetworkMenu::IconForNetworkStrength(*lit, true); |
if ((*it)->encrypted()) { |
icon = chromeos::NetworkMenu::IconForDisplay(icon, |
*rb.GetBitmapNamed(IDR_STATUSBAR_NETWORK_SECURE)); |
stevenjb
2011/01/21 17:11:18
Does the secure icon trump the signal strength ico
Charlie Lee
2011/01/21 19:21:09
Isn't the secure icon just a badge? If so, then we
|