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

Unified Diff: chrome/browser/resources/options/chromeos/internet_detail.js

Issue 364883002: Replace additional network properties with ONC values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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
Index: chrome/browser/resources/options/chromeos/internet_detail.js
diff --git a/chrome/browser/resources/options/chromeos/internet_detail.js b/chrome/browser/resources/options/chromeos/internet_detail.js
index 252197a76cfc4bca687b6e0c5ddd47e0cd5872e8..4cccff27d0ce6bea2426d3b4e0f2b74c8ac4a70f 100644
--- a/chrome/browser/resources/options/chromeos/internet_detail.js
+++ b/chrome/browser/resources/options/chromeos/internet_detail.js
@@ -1129,19 +1129,25 @@ cr.define('options.internet', function() {
$('service-name').textContent = getNetworkName(data);
}
- $('network-technology').textContent = data.networkTechnology;
+ $('network-technology').textContent = data.Cellular.NetworkTechnology;
$('activation-state').textContent = data.activationState;
$('roaming-state').textContent = data.roamingState;
$('restricted-pool').textContent = data.restrictedPool;
$('error-state').textContent = data.errorState;
- $('manufacturer').textContent = data.cellularManufacturer;
- $('model-id').textContent = data.modelId;
- $('firmware-revision').textContent = data.firmwareRevision;
- $('hardware-revision').textContent = data.hardwareRevision;
- $('mdn').textContent = data.mdn;
- $('operator-name').textContent = data.operatorName;
- $('operator-code').textContent = data.operatorCode;
-
+ $('manufacturer').textContent = data.Cellular.Manufacturer;
+ $('model-id').textContent = data.Cellular.ModelID;
+ $('firmware-revision').textContent = data.Cellular.FirmwareRevision;
+ $('hardware-revision').textContent = data.Cellular.HardwareRevision;
+ $('mdn').textContent = data.Cellular.MDN;
+
+ // Show ServingOperator properties only if available.
+ if (data.Cellular.ServingOperator) {
+ $('operator-name').textContent = data.Cellular.ServingOperator.Name;
pneubeck (no reviews) 2014/07/07 09:14:26 could use the setContentOrHide function from below
stevenjb 2014/07/07 23:40:21 Logic is slightly different; these depend on wheth
+ $('operator-code').textContent = data.Cellular.ServingOperator.Code;
+ } else {
+ $('operator-name').parentElement.hidden = true;
+ $('operator-code').parentElement.hidden = true;
+ }
// Make sure that GSM/CDMA specific properties that shouldn't be hidden
// are visible.
updateHidden('#details-internet-page .gsm-only', false);
@@ -1149,23 +1155,22 @@ cr.define('options.internet', function() {
// Show IMEI/ESN/MEID/MIN/PRL only if they are available.
(function() {
- var setContentOrHide = function(property) {
- var value = data[property];
+ var setContentOrHide = function(field, value) {
if (value)
- $(property).textContent = value;
+ $(field).textContent = value;
else
- $(property).parentElement.hidden = true;
+ $(field).parentElement.hidden = true;
};
- setContentOrHide('esn');
- setContentOrHide('imei');
- setContentOrHide('meid');
- setContentOrHide('min');
- setContentOrHide('prl-version');
+ setContentOrHide('esn', data.Cellular.ESN);
+ setContentOrHide('imei', data.Cellular.IMEI);
+ setContentOrHide('meid', data.Cellular.MEID);
+ setContentOrHide('min', data.Cellular.MIN);
+ setContentOrHide('prl-version', data.Cellular.PRLVersion);
})();
- detailsPage.gsm = data.gsm;
- if (data.gsm) {
- $('iccid').textContent = stringFromValue(data.iccid);
- $('imsi').textContent = stringFromValue(data.imsi);
+ detailsPage.gsm = data.Cellular.Family == 'GSM';
+ if (detailsPage.gsm) {
+ $('iccid').textContent = stringFromValue(data.Cellular.ICCID);
pneubeck (no reviews) 2014/07/07 09:14:26 stringFromValue not required here and in the next
stevenjb 2014/07/07 23:40:21 Done.
+ $('imsi').textContent = stringFromValue(data.Cellular.IMSI);
var apnSelector = $('select-apn');
// Clear APN lists, keep only last element that "other".

Powered by Google App Engine
This is Rietveld 408576698