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

Side by Side Diff: chrome/browser/resources/options2/chromeos/preferred_networks.js

Issue 10392185: Call correct callback in preferred_networks.js (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.define('options', function() { 5 cr.define('options', function() {
6 6
7 var OptionsPage = options.OptionsPage; 7 var OptionsPage = options.OptionsPage;
8 var ArrayDataModel = cr.ui.ArrayDataModel; 8 var ArrayDataModel = cr.ui.ArrayDataModel;
9 var DeletableItem = options.DeletableItem; 9 var DeletableItem = options.DeletableItem;
10 var DeletableItemList = options.DeletableItemList; 10 var DeletableItemList = options.DeletableItemList;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 /** @inheritDoc */ 117 /** @inheritDoc */
118 createItem: function(entry) { 118 createItem: function(entry) {
119 return new PreferredNetworkListItem(entry); 119 return new PreferredNetworkListItem(entry);
120 }, 120 },
121 121
122 /** @inheritDoc */ 122 /** @inheritDoc */
123 deleteItemAtIndex: function(index) { 123 deleteItemAtIndex: function(index) {
124 var item = this.dataModel.item(index); 124 var item = this.dataModel.item(index);
125 if (item) { 125 if (item) {
126 // Inform the network library that we are forgetting this network. 126 // Inform the network library that we are forgetting this network.
127 chrome.send('buttonClickCallback', 127 chrome.send('networkCommand',
128 [String(item.networkType), 128 [String(item.networkType),
129 item.servicePath, 129 item.servicePath,
130 'forget']); 130 'forget']);
131 } 131 }
132 this.dataModel.splice(index, 1); 132 this.dataModel.splice(index, 1);
133 // Invalidate the list since it has a stale cache after a splice 133 // Invalidate the list since it has a stale cache after a splice
134 // involving a deletion. 134 // involving a deletion.
135 this.invalidate(); 135 this.invalidate();
136 this.redraw(); 136 this.redraw();
137 }, 137 },
(...skipping 18 matching lines...) Expand all
156 } 156 }
157 }; 157 };
158 158
159 // Export 159 // Export
160 return { 160 return {
161 PreferredNetworks: PreferredNetworks 161 PreferredNetworks: PreferredNetworks
162 }; 162 };
163 163
164 }); 164 });
165 165
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698