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

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

Issue 11467013: First cut at UI for saving net_internals data into a file for mobile (Android and Ios). (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 /** 5 /**
6 * Dictionary of constants (Initialized soon after loading by data from browser, 6 * Dictionary of constants (Initialized soon after loading by data from browser,
7 * updated on load log). The *Types dictionaries map strings to numeric IDs, 7 * updated on load log). The *Types dictionaries map strings to numeric IDs,
8 * while the *TypeNames are the other way around. 8 * while the *TypeNames are the other way around.
9 */ 9 */
10 var EventType = null; 10 var EventType = null;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 tabs.addTab(TestView.TAB_HANDLE_ID, TestView.getInstance(), false, true); 99 tabs.addTab(TestView.TAB_HANDLE_ID, TestView.getInstance(), false, true);
100 tabs.addTab(HSTSView.TAB_HANDLE_ID, HSTSView.getInstance(), false, true); 100 tabs.addTab(HSTSView.TAB_HANDLE_ID, HSTSView.getInstance(), false, true);
101 tabs.addTab(LogsView.TAB_HANDLE_ID, LogsView.getInstance(), 101 tabs.addTab(LogsView.TAB_HANDLE_ID, LogsView.getInstance(),
102 false, cr.isChromeOS); 102 false, cr.isChromeOS);
103 tabs.addTab(BandwidthView.TAB_HANDLE_ID, BandwidthView.getInstance(), 103 tabs.addTab(BandwidthView.TAB_HANDLE_ID, BandwidthView.getInstance(),
104 false, true); 104 false, true);
105 tabs.addTab(PrerenderView.TAB_HANDLE_ID, PrerenderView.getInstance(), 105 tabs.addTab(PrerenderView.TAB_HANDLE_ID, PrerenderView.getInstance(),
106 false, true); 106 false, true);
107 tabs.addTab(CrosView.TAB_HANDLE_ID, CrosView.getInstance(), 107 tabs.addTab(CrosView.TAB_HANDLE_ID, CrosView.getInstance(),
108 false, cr.isChromeOS); 108 false, cr.isChromeOS);
109 tabs.addTab(MobileView.TAB_HANDLE_ID, MobileView.getInstance(),
110 false, cr.isMobile);
109 111
110 // Build a map from the anchor name of each tab handle to its "tab ID". 112 // Build a map from the anchor name of each tab handle to its "tab ID".
111 // We will consider navigations to the #hash as a switch tab request. 113 // We will consider navigations to the #hash as a switch tab request.
112 var anchorMap = {}; 114 var anchorMap = {};
113 var tabIds = tabs.getAllTabIds(); 115 var tabIds = tabs.getAllTabIds();
114 for (var i = 0; i < tabIds.length; ++i) { 116 for (var i = 0; i < tabIds.length; ++i) {
115 var aNode = $(tabIds[i]); 117 var aNode = $(tabIds[i]);
116 anchorMap[aNode.hash] = tabIds[i]; 118 anchorMap[aNode.hash] = tabIds[i];
117 } 119 }
118 // Default the empty hash to the data tab. 120 // Default the empty hash to the data tab.
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 * Returns a string representation of |family|. 306 * Returns a string representation of |family|.
305 * @param {number} family An AddressFamily 307 * @param {number} family An AddressFamily
306 * @return {string} A representation of the given family. 308 * @return {string} A representation of the given family.
307 */ 309 */
308 function addressFamilyToString(family) { 310 function addressFamilyToString(family) {
309 var str = getKeyWithValue(AddressFamily, family); 311 var str = getKeyWithValue(AddressFamily, family);
310 // All the address family start with ADDRESS_FAMILY_*. 312 // All the address family start with ADDRESS_FAMILY_*.
311 // Strip that prefix since it is redundant and only clutters the output. 313 // Strip that prefix since it is redundant and only clutters the output.
312 return str.replace(/^ADDRESS_FAMILY_/, ''); 314 return str.replace(/^ADDRESS_FAMILY_/, '');
313 } 315 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698