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

Unified Diff: chrome/browser/resources/settings/internet_page/internet_detail_page.js

Issue 2949363002: [CrOS Tether] Network detail settings page: Do not show irrelevant fields for Tether networks. (Closed)
Patch Set: Fix Closure error. Created 3 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/internet_page/internet_detail_page.js
diff --git a/chrome/browser/resources/settings/internet_page/internet_detail_page.js b/chrome/browser/resources/settings/internet_page/internet_detail_page.js
index ce8553d223b4e417441cc36678ed3c30df158512..0a79a415eaf1af034dee11b5812fd847e16e769b 100644
--- a/chrome/browser/resources/settings/internet_page/internet_detail_page.js
+++ b/chrome/browser/resources/settings/internet_page/internet_detail_page.js
@@ -887,8 +887,9 @@ Polymer({
*/
getAdvancedFields_: function() {
/** @type {!Array<string>} */ var fields = [];
- fields.push('MacAddress');
var type = this.networkProperties.Type;
+ if (type != CrOnc.Type.TETHER)
+ fields.push('MacAddress');
if (type == CrOnc.Type.CELLULAR && !!this.networkProperties.Cellular) {
fields.push(
'Cellular.Carrier', 'Cellular.Family', 'Cellular.NetworkTechnology',
@@ -928,6 +929,11 @@ Polymer({
* @private
*/
showAdvanced_: function(networkProperties) {
+ if (networkProperties.Type == CrOnc.Type.TETHER) {
+ // These settings apply to the underlying WiFi network, not the Tether
+ // network.
+ return false;
+ }
return this.hasAdvancedFields_() || this.hasDeviceFields_() ||
this.isRememberedOrConnected_(networkProperties);
},
@@ -962,6 +968,11 @@ Polymer({
* @private
*/
hasNetworkSection_: function(networkProperties) {
+ if (networkProperties.Type == CrOnc.Type.TETHER) {
+ // These settings apply to the underlying WiFi network, not the Tether
+ // network.
+ return false;
+ }
if (networkProperties.Type == CrOnc.Type.VPN)
return false;
if (networkProperties.Type == CrOnc.Type.CELLULAR)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698