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

Side by Side Diff: chrome/browser/resources/chromeos/network.js

Issue 23441025: Clean up NetworkState members (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 var NetworkUI = function() { 5 var NetworkUI = function() {
6 // Properties to display in the network state table 6 // Properties to display in the network state table
7 var NETWORK_STATE_FIELDS = ['Name', 'Type', 'State', 'Profile', 'Connectable', 7 var NETWORK_STATE_FIELDS = [
8 'Error', 'ADdress', 'Security', 'Cellular.NetworkTechnology', 8 'Name', 'Type', 'State', 'Profile', 'Connectable',
9 'Cellular.ActivationState', 'Cellular.RoamingState', 9 'Error', 'Address', 'Security', 'Cellular.NetworkTechnology',
10 'Cellular.OutOfCredits', 'signalStrength', 'AutoConnect', 10 'Cellular.ActivationState', 'Cellular.RoamingState',
11 'Favorite', 'Priority']; 11 'Cellular.OutOfCredits', 'Strength'
12 ];
12 13
13 var LOG_LEVEL_CLASSNAME = { 14 var LOG_LEVEL_CLASSNAME = {
14 'Error': 'network-log-level-error', 15 'Error': 'network-log-level-error',
15 'User': 'network-log-level-user', 16 'User': 'network-log-level-user',
16 'Event': 'network-log-level-event', 17 'Event': 'network-log-level-event',
17 'Debug': 'network-log-level-debug' 18 'Debug': 'network-log-level-debug'
18 }; 19 };
19 20
20 var LOG_LEVEL_CHECKBOX = { 21 var LOG_LEVEL_CHECKBOX = {
21 'Error': 'log-error', 22 'Error': 'log-error',
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 * Create a row in the network state table. 98 * Create a row in the network state table.
98 * 99 *
99 * @param {string} path The network path. 100 * @param {string} path The network path.
100 * @param {dictionary} status Properties of the network. 101 * @param {dictionary} status Properties of the network.
101 * @return {DOMElement} The created tr element that contains the network 102 * @return {DOMElement} The created tr element that contains the network
102 * state information. 103 * state information.
103 */ 104 */
104 var createStatusTableRow = function(path, status) { 105 var createStatusTableRow = function(path, status) {
105 var row = document.createElement('tr'); 106 var row = document.createElement('tr');
106 row.className = 'network-status-table-row'; 107 row.className = 'network-status-table-row';
108 row.appendChild(createStatusTableCell(path));
109 row.appendChild(createStatusTableCell(status['GUID'].slice(1, 9)));
107 for (var i = 0; i < NETWORK_STATE_FIELDS.length; ++i) { 110 for (var i = 0; i < NETWORK_STATE_FIELDS.length; ++i) {
108 row.appendChild(createStatusTableCell(status[NETWORK_STATE_FIELDS[i]])); 111 row.appendChild(createStatusTableCell(status[NETWORK_STATE_FIELDS[i]]));
109 } 112 }
110 row.appendChild(createStatusTableCell(path));
111 return row; 113 return row;
112 }; 114 };
113 115
114 /** 116 /**
115 * Create network state table. 117 * Create network state table.
116 * 118 *
117 * @param {Array.<Object>} networkStatuses An array of network states. 119 * @param {Array.<Object>} networkStatuses An array of network states.
118 */ 120 */
119 var createNetworkTable = function(networkStatuses) { 121 var createNetworkTable = function(networkStatuses) {
120 var table = $('network-status-table'); 122 var table = $('network-status-table');
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 $('log-fileinfo').checked = false; 171 $('log-fileinfo').checked = false;
170 $('log-fileinfo').onclick = sendRefresh; 172 $('log-fileinfo').onclick = sendRefresh;
171 setRefresh(); 173 setRefresh();
172 sendRefresh(); 174 sendRefresh();
173 }); 175 });
174 176
175 return { 177 return {
176 onNetworkInfoReceived: onNetworkInfoReceived 178 onNetworkInfoReceived: onNetworkInfoReceived
177 }; 179 };
178 }(); 180 }();
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/network.html ('k') | chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698