diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-23 17:21:03 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-23 16:25:15 +0000 |
commit | c551f43206405019121bd2b2c93714319a0a3300 (patch) | |
tree | 1f48c30631c421fd4bbb3c36da20183c8a2ed7d7 /chromium/chrome/browser/resources/settings/internet_page/network_summary_item.js | |
parent | 7961cea6d1041e3e454dae6a1da660b453efd238 (diff) |
BASELINE: Update Chromium to 79.0.3945.139
Change-Id: I336b7182fab9bca80b709682489c07db112eaca5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/chrome/browser/resources/settings/internet_page/network_summary_item.js')
-rw-r--r-- | chromium/chrome/browser/resources/settings/internet_page/network_summary_item.js | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/chromium/chrome/browser/resources/settings/internet_page/network_summary_item.js b/chromium/chrome/browser/resources/settings/internet_page/network_summary_item.js index 09cbcd3965e..7b26f618a41 100644 --- a/chromium/chrome/browser/resources/settings/internet_page/network_summary_item.js +++ b/chromium/chrome/browser/resources/settings/internet_page/network_summary_item.js @@ -132,7 +132,12 @@ Polymer({ const connectionState = networkState.connectionState; const name = OncMojo.getNetworkStateDisplayName(networkState); if (OncMojo.connectionStateIsConnected(connectionState)) { - return name; + // Ethernet networks always have the display name 'Ethernet' so we use the + // state text 'Connected' to avoid repeating the label in the sublabel. + // See http://crbug.com/989907 for details. + return networkState.type == mojom.NetworkType.kEthernet ? + CrOncStrings.networkListItemConnected : + name; } if (connectionState == mojom.ConnectionStateType.kConnecting) { return name ? @@ -282,14 +287,22 @@ Polymer({ const type = deviceState.type; if (type == mojom.NetworkType.kTether || (type == mojom.NetworkType.kCellular && this.tetherDeviceState)) { - // The "Mobile data" subpage should always be shown if Tether networks are + // The "Mobile data" subpage should always be shown if Tether is // available, even if there are currently no associated networks. return true; } - const minlen = - (type == mojom.NetworkType.kWiFi || type == mojom.NetworkType.kVPN) ? - 1 : - 2; + let minlen; + if (type == mojom.NetworkType.kVPN) { + // VPN subpage provides provider info so show if there are any networks. + minlen = 1; + } else if (type == mojom.NetworkType.kWiFi) { + // WiFi subpage includes 'Known Networks' so always show, even if the + // technology is still enabling / scanning, or none are visible. + minlen = 0; + } else { + // By default, only show the subpage if there are 2+ networks + minlen = 2; + } return networkStateList.length >= minlen; }, |