Commit 0d9fb0e7 authored by stevenjb@chromium.org's avatar stevenjb@chromium.org

Replace additional network properties with ONC values

BUG=279351

Review URL: https://codereview.chromium.org/364883002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281997 0039d316-1c4b-4281-b951-d872f2087c98
parent 11c1b7c1
...@@ -1138,19 +1138,25 @@ cr.define('options.internet', function() { ...@@ -1138,19 +1138,25 @@ cr.define('options.internet', function() {
$('service-name').textContent = getNetworkName(data); $('service-name').textContent = getNetworkName(data);
} }
$('network-technology').textContent = data.networkTechnology; $('network-technology').textContent = data.Cellular.NetworkTechnology;
$('activation-state').textContent = data.activationState; $('activation-state').textContent = data.activationState;
$('roaming-state').textContent = data.roamingState; $('roaming-state').textContent = data.roamingState;
$('restricted-pool').textContent = data.restrictedPool; $('restricted-pool').textContent = data.restrictedPool;
$('error-state').textContent = data.errorState; $('error-state').textContent = data.errorState;
$('manufacturer').textContent = data.cellularManufacturer; $('manufacturer').textContent = data.Cellular.Manufacturer;
$('model-id').textContent = data.modelId; $('model-id').textContent = data.Cellular.ModelID;
$('firmware-revision').textContent = data.firmwareRevision; $('firmware-revision').textContent = data.Cellular.FirmwareRevision;
$('hardware-revision').textContent = data.hardwareRevision; $('hardware-revision').textContent = data.Cellular.HardwareRevision;
$('mdn').textContent = data.mdn; $('mdn').textContent = data.Cellular.MDN;
$('operator-name').textContent = data.operatorName;
$('operator-code').textContent = data.operatorCode; // 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 // Make sure that GSM/CDMA specific properties that shouldn't be hidden
// are visible. // are visible.
updateHidden('#details-internet-page .gsm-only', false); updateHidden('#details-internet-page .gsm-only', false);
...@@ -1158,23 +1164,22 @@ cr.define('options.internet', function() { ...@@ -1158,23 +1164,22 @@ cr.define('options.internet', function() {
// Show IMEI/ESN/MEID/MIN/PRL only if they are available. // Show IMEI/ESN/MEID/MIN/PRL only if they are available.
(function() { (function() {
var setContentOrHide = function(property) { var setContentOrHide = function(field, value) {
var value = data[property];
if (value) if (value)
$(property).textContent = value; $(field).textContent = value;
else else
$(property).parentElement.hidden = true; $(field).parentElement.hidden = true;
}; };
setContentOrHide('esn'); setContentOrHide('esn', data.Cellular.ESN);
setContentOrHide('imei'); setContentOrHide('imei', data.Cellular.IMEI);
setContentOrHide('meid'); setContentOrHide('meid', data.Cellular.MEID);
setContentOrHide('min'); setContentOrHide('min', data.Cellular.MIN);
setContentOrHide('prl-version'); setContentOrHide('prl-version', data.Cellular.PRLVersion);
})(); })();
detailsPage.gsm = data.gsm; detailsPage.gsm = data.Cellular.Family == 'GSM';
if (data.gsm) { if (detailsPage.gsm) {
$('iccid').textContent = stringFromValue(data.iccid); $('iccid').textContent = data.Cellular.ICCID;
$('imsi').textContent = stringFromValue(data.imsi); $('imsi').textContent = data.Cellular.IMSI;
var apnSelector = $('select-apn'); var apnSelector = $('select-apn');
// Clear APN lists, keep only last element that "other". // Clear APN lists, keep only last element that "other".
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "chromeos/dbus/shill_profile_client.h" #include "chromeos/dbus/shill_profile_client.h"
#include "chromeos/dbus/shill_service_client.h" #include "chromeos/dbus/shill_service_client.h"
#include "chromeos/network/network_event_log.h" #include "chromeos/network/network_event_log.h"
#include "chromeos/network/network_state.h"
#include "chromeos/network/network_state_handler.h" #include "chromeos/network/network_state_handler.h"
#include "chromeos/network/shill_property_util.h" #include "chromeos/network/shill_property_util.h"
#include "dbus/object_path.h" #include "dbus/object_path.h"
...@@ -303,11 +304,12 @@ void NetworkConfigurationHandler::RemoveConfiguration( ...@@ -303,11 +304,12 @@ void NetworkConfigurationHandler::RemoveConfiguration(
const network_handler::ErrorCallback& error_callback) { const network_handler::ErrorCallback& error_callback) {
// Service.Remove is not reliable. Instead, request the profile entries // Service.Remove is not reliable. Instead, request the profile entries
// for the service and remove each entry. // for the service and remove each entry.
if (ContainsKey(profile_entry_deleters_,service_path)) { if (ContainsKey(profile_entry_deleters_, service_path)) {
InvokeErrorCallback( InvokeErrorCallback(
service_path, error_callback, "RemoveConfigurationInProgress"); service_path, error_callback, "RemoveConfigurationInProgress");
return; return;
} }
NET_LOG_USER("Remove Configuration", service_path); NET_LOG_USER("Remove Configuration", service_path);
ProfileEntryDeleter* deleter = ProfileEntryDeleter* deleter =
new ProfileEntryDeleter(this, service_path, callback, error_callback); new ProfileEntryDeleter(this, service_path, callback, error_callback);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment