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

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: Rebase Created 6 years, 5 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 | chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e16008b756aaca203f07cbbcae187615475ac9ee..c3cc240277884d692b7042f5822e29b5640f220e 100644
--- a/chrome/browser/resources/options/chromeos/internet_detail.js
+++ b/chrome/browser/resources/options/chromeos/internet_detail.js
@@ -1138,19 +1138,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;
+ $('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);
@@ -1158,23 +1164,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 = data.Cellular.ICCID;
+ $('imsi').textContent = data.Cellular.IMSI;
var apnSelector = $('select-apn');
// Clear APN lists, keep only last element that "other".
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698