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

Side by Side Diff: chrome/browser/resources/options/chromeos/internet_detail.js

Issue 647713004: Fix 'Automatic name servers' display in Settings' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // require: onc_data.js 5 // require: onc_data.js
6 6
7 // NOTE(stevenjb): This code is in the process of being converted to be 7 // NOTE(stevenjb): This code is in the process of being converted to be
8 // compatible with the networkingPrivate extension API: 8 // compatible with the networkingPrivate extension API:
9 // * The network property dictionaries are being converted to use ONC values. 9 // * The network property dictionaries are being converted to use ONC values.
10 // * chrome.send calls will be replaced with an API object that simulates the 10 // * chrome.send calls will be replaced with an API object that simulates the
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 // Set Nameserver fields. 1370 // Set Nameserver fields.
1371 var nameServerType = 'automatic'; 1371 var nameServerType = 'automatic';
1372 if (staticNameServersString) { 1372 if (staticNameServersString) {
1373 // If static nameservers are defined and match the google name servers, 1373 // If static nameservers are defined and match the google name servers,
1374 // show that in the UI, otherwise show the custom static nameservers. 1374 // show that in the UI, otherwise show the custom static nameservers.
1375 if (staticNameServersString == GoogleNameServersString) 1375 if (staticNameServersString == GoogleNameServersString)
1376 nameServerType = 'google'; 1376 nameServerType = 'google';
1377 else if (staticNameServersString == inetNameServersString) 1377 else if (staticNameServersString == inetNameServersString)
1378 nameServerType = 'user'; 1378 nameServerType = 'user';
1379 } 1379 }
1380 $('automatic-dns-display').textContent = inetNameServersString; 1380 if (nameServerType == 'automatic')
1381 $('automatic-dns-display').textContent = inetNameServersString;
1382 else
1383 $('automatic-dns-display').textContent = savedNameServersString;
1381 $('google-dns-display').textContent = GoogleNameServersString; 1384 $('google-dns-display').textContent = GoogleNameServersString;
1382 1385
1383 var nameServersUser = []; 1386 var nameServersUser = [];
1384 if (staticNameServers) { 1387 if (staticNameServers) {
1385 nameServersUser = staticNameServers; 1388 nameServersUser = staticNameServers;
1386 } else if (savedNameServers) { 1389 } else if (savedNameServers) {
1387 // Pre-populate with values provided by DHCP server. 1390 // Pre-populate with values provided by DHCP server.
1388 nameServersUser = savedNameServers; 1391 nameServersUser = savedNameServers;
1389 } 1392 }
1390 1393
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 1618
1616 // Don't show page name in address bar and in history to prevent people 1619 // Don't show page name in address bar and in history to prevent people
1617 // navigate here by hand and solve issue with page session restore. 1620 // navigate here by hand and solve issue with page session restore.
1618 PageManager.showPageByName('detailsInternetPage', false); 1621 PageManager.showPageByName('detailsInternetPage', false);
1619 }; 1622 };
1620 1623
1621 return { 1624 return {
1622 DetailsInternetPage: DetailsInternetPage 1625 DetailsInternetPage: DetailsInternetPage
1623 }; 1626 };
1624 }); 1627 });
OLDNEW
« 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