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

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

Issue 983823002: Use GUID instead of servicePath in network settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_430115_internet_options_enable_extension_apis
Patch Set: Use guid instead of service_path for proxy prefs Created 5 years, 9 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/network_list.js
diff --git a/chrome/browser/resources/options/chromeos/network_list.js b/chrome/browser/resources/options/chromeos/network_list.js
index 6c34bdf7661141558c10670f13ebf7dff514f637..48549cd3222123220875a936293ad4a40aa67936 100644
--- a/chrome/browser/resources/options/chromeos/network_list.js
+++ b/chrome/browser/resources/options/chromeos/network_list.js
@@ -5,14 +5,13 @@
/**
* This partially describes the network list entries passed to
* refreshNetworkData. The contents of those lists actually match
- * CrOnc.NetworkConfigType with the addition of the policyManaged and
- * servicePath properties. TODO(stevenjb): Use networkingPrivate.getNetworks.
+ * CrOnc.NetworkConfigType with the addition of the policyManaged property.
+ * TODO(stevenjb): Use networkingPrivate.getNetworks.
* @typedef {{
* ConnectionState: string,
* GUID: string,
* Type: string,
* policyManaged: boolean,
- * servicePath: string
* }}
* @see chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
*/
@@ -161,13 +160,11 @@ cr.define('options.network', function() {
}
/**
- * @param {string} servicePath The network service path.
+ * @param {string} guid The network GUID.
*/
- function showDetails(servicePath) {
- // TODO(stevenjb): chrome.networkingPrivate.getManagedProperties
- // (Note: we will need to provide DetailsInternetPage.initializeDetailsPage
- // as the callback).
- chrome.send('getManagedProperties', [servicePath]);
+ function showDetails(guid) {
+ chrome.networkingPrivate.getManagedProperties(
+ guid, DetailsInternetPage.initializeDetailsPage);
}
/**
@@ -717,11 +714,10 @@ cr.define('options.network', function() {
* @private
*/
createNetworkOptionsCallback_: function(parent, data) {
- var servicePath = data.servicePath;
var menuItem = createCallback_(parent,
data,
getNetworkName(data),
- showDetails.bind(null, servicePath));
+ showDetails.bind(null, data.GUID));
if (data.policyManaged)
menuItem.appendChild(new ManagedNetworkIndicator());
if (data.ConnectionState == 'Connected' ||
@@ -1033,10 +1029,7 @@ cr.define('options.network', function() {
var ethernetConnection = getConnection_(data.wiredList);
if (ethernetConnection) {
var type = String('Ethernet');
- var path = ethernetConnection.servicePath;
- var ethernetOptions = function() {
- showDetails(path);
- };
+ var ethernetOptions = showDetails.bind(null, ethernetConnection.GUID);
networkList.update(
{ key: 'Ethernet',
subtitle: loadTimeData.getString('OncConnectionStateConnected'),
« no previous file with comments | « chrome/browser/resources/options/chromeos/internet_detail.js ('k') | chrome/browser/resources/options/chromeos/onc_data.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698