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

Side by Side Diff: chrome/browser/resources/options/chromeos/preferred_networks.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 unified diff | Download patch
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 cr.exportPath('options'); 5 cr.exportPath('options');
6 6
7 /** 7 /**
8 * @typedef {{Name: string, Type: string, servicePath: string}} 8 * @typedef {{Name: string, Type: string, GUID: string}}
9 */ 9 */
10 options.PreferredNetwork; 10 options.PreferredNetwork;
11 11
12 cr.define('options', function() { 12 cr.define('options', function() {
13 13
14 var Page = cr.ui.pageManager.Page; 14 var Page = cr.ui.pageManager.Page;
15 var PageManager = cr.ui.pageManager.PageManager; 15 var PageManager = cr.ui.pageManager.PageManager;
16 var ArrayDataModel = cr.ui.ArrayDataModel; 16 var ArrayDataModel = cr.ui.ArrayDataModel;
17 var DeletableItem = options.DeletableItem; 17 var DeletableItem = options.DeletableItem;
18 var DeletableItemList = options.DeletableItemList; 18 var DeletableItemList = options.DeletableItemList;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 createItem: function(entry) { 121 createItem: function(entry) {
122 return new PreferredNetworkListItem(entry); 122 return new PreferredNetworkListItem(entry);
123 }, 123 },
124 124
125 /** @override */ 125 /** @override */
126 deleteItemAtIndex: function(index) { 126 deleteItemAtIndex: function(index) {
127 var item = this.dataModel.item(index); 127 var item = this.dataModel.item(index);
128 if (item) { 128 if (item) {
129 // TODO(stevenjb): Add removeNetwork to chrome.networkingPrivate and 129 // TODO(stevenjb): Add removeNetwork to chrome.networkingPrivate and
130 // use that here. 130 // use that here.
131 chrome.send('removeNetwork', [item.servicePath]); 131 chrome.send('removeNetwork', [item.GUID]);
132 } 132 }
133 this.dataModel.splice(index, 1); 133 this.dataModel.splice(index, 1);
134 // Invalidate the list since it has a stale cache after a splice 134 // Invalidate the list since it has a stale cache after a splice
135 // involving a deletion. 135 // involving a deletion.
136 this.invalidate(); 136 this.invalidate();
137 this.redraw(); 137 this.redraw();
138 }, 138 },
139 139
140 /** 140 /**
141 * Purges all networks from the list. 141 * Purges all networks from the list.
(...skipping 11 matching lines...) Expand all
153 this.dataModel.push(data); 153 this.dataModel.push(data);
154 } 154 }
155 }; 155 };
156 156
157 // Export 157 // Export
158 return { 158 return {
159 PreferredNetworks: PreferredNetworks 159 PreferredNetworks: PreferredNetworks
160 }; 160 };
161 161
162 }); 162 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/chromeos/onc_data.js ('k') | chrome/browser/ui/ash/network_connect_delegate_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698