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

Side by Side Diff: chrome/browser/resources/net_internals/socket_pool_wrapper.js

Issue 2602473003: Run tools/clang-format-js on chrome/browser/resources/net_internals (Closed)
Patch Set: drop dep Created 3 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 SocketPoolWrapper = (function() { 5 var SocketPoolWrapper = (function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * SocketPoolWrapper is a wrapper around socket pools entries. It's 9 * SocketPoolWrapper is a wrapper around socket pools entries. It's
10 * used by the log and sockets view to print tables containing both 10 * used by the log and sockets view to print tables containing both
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 * Recursively creates SocketPoolWrappers from |origPool| and all its 58 * Recursively creates SocketPoolWrappers from |origPool| and all its
59 * children and adds them all to |socketPoolList|. |parent| is the 59 * children and adds them all to |socketPoolList|. |parent| is the
60 * SocketPoolWrapper for the parent of |origPool|, or null, if it's 60 * SocketPoolWrapper for the parent of |origPool|, or null, if it's
61 * a top level socket pool. 61 * a top level socket pool.
62 */ 62 */
63 function addSocketPoolsToList(socketPoolList, origPool, parent) { 63 function addSocketPoolsToList(socketPoolList, origPool, parent) {
64 var socketPool = new SocketPoolWrapper(origPool, parent); 64 var socketPool = new SocketPoolWrapper(origPool, parent);
65 socketPoolList.push(socketPool); 65 socketPoolList.push(socketPool);
66 if (origPool.nested_pools) { 66 if (origPool.nested_pools) {
67 for (var i = 0; i < origPool.nested_pools.length; ++i) { 67 for (var i = 0; i < origPool.nested_pools.length; ++i) {
68 addSocketPoolsToList(socketPoolList, 68 addSocketPoolsToList(
69 origPool.nested_pools[i], 69 socketPoolList, origPool.nested_pools[i], socketPool);
70 socketPool);
71 } 70 }
72 } 71 }
73 } 72 }
74 73
75 /** 74 /**
76 * Returns a table printer containing information on each 75 * Returns a table printer containing information on each
77 * SocketPoolWrapper in |socketPools|. 76 * SocketPoolWrapper in |socketPools|.
78 */ 77 */
79 SocketPoolWrapper.createTablePrinter = function(socketPools) { 78 SocketPoolWrapper.createTablePrinter = function(socketPools) {
80 var tablePrinter = new TablePrinter(); 79 var tablePrinter = new TablePrinter();
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 * specified sources. 164 * specified sources.
166 */ 165 */
167 function sourceListLink(sources) { 166 function sourceListLink(sources) {
168 if (!sources.length) 167 if (!sources.length)
169 return null; 168 return null;
170 return '#events&q=id:' + sources.join(','); 169 return '#events&q=id:' + sources.join(',');
171 } 170 }
172 171
173 return SocketPoolWrapper; 172 return SocketPoolWrapper;
174 })(); 173 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698