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

Unified Diff: ash/common/system/chromeos/network/network_icon.cc

Issue 2587133003: [ash-md] Removes "Connecting..." suffix from the network / VPN rows (Closed)
Patch Set: [ash-md] Removes 'Connecting...' suffix from the network row (nits) Created 4 years 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: ash/common/system/chromeos/network/network_icon.cc
diff --git a/ash/common/system/chromeos/network/network_icon.cc b/ash/common/system/chromeos/network/network_icon.cc
index fbd1b33a7d6395a034727bd90b55565bb46c2540..73998191f798f0cb0935917ab7007446c4722868 100644
--- a/ash/common/system/chromeos/network/network_icon.cc
+++ b/ash/common/system/chromeos/network/network_icon.cc
@@ -200,7 +200,7 @@ bool IconTypeIsDark(IconType icon_type) {
}
bool IconTypeHasVPNBadge(IconType icon_type) {
- return (icon_type != ICON_TYPE_LIST);
+ return (icon_type != ICON_TYPE_LIST && icon_type != ICON_TYPE_MENU_LIST);
}
// This defines how we assemble a network icon.
@@ -926,14 +926,17 @@ base::string16 GetLabelForNetwork(const chromeos::NetworkState* network,
IconType icon_type) {
DCHECK(network);
std::string activation_state = network->activation_state();
- if (icon_type == ICON_TYPE_LIST) {
+ if (icon_type == ICON_TYPE_LIST || icon_type == ICON_TYPE_MENU_LIST) {
// Show "<network>: [Connecting|Activating|Reconnecting]..."
+ // TODO(varkha): Remaining states should migrate to secondary status in the
+ // network item and no longer be part of the label.
+ // See http://crbug.com/676181 .
if (network->IsReconnecting()) {
return l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_NETWORK_LIST_RECONNECTING,
base::UTF8ToUTF16(network->name()));
}
- if (network->IsConnectingState()) {
+ if (icon_type != ICON_TYPE_MENU_LIST && network->IsConnectingState()) {
return l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_NETWORK_LIST_CONNECTING,
base::UTF8ToUTF16(network->name()));
@@ -1089,6 +1092,7 @@ void PurgeNetworkIconCache() {
PurgeIconMap(ICON_TYPE_TRAY, network_paths);
PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths);
PurgeIconMap(ICON_TYPE_LIST, network_paths);
+ PurgeIconMap(ICON_TYPE_MENU_LIST, network_paths);
}
} // namespace network_icon
« no previous file with comments | « ash/common/system/chromeos/network/network_icon.h ('k') | ash/common/system/chromeos/network/network_list_md.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698