OLD | NEW |
---|---|
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
194 addTab(QuicView); | 194 addTab(QuicView); |
195 addTab(HttpCacheView); | 195 addTab(HttpCacheView); |
196 addTab(ModulesView); | 196 addTab(ModulesView); |
197 addTab(TestView); | 197 addTab(TestView); |
198 addTab(CrosLogVisualizerView); | 198 addTab(CrosLogVisualizerView); |
199 addTab(HSTSView); | 199 addTab(HSTSView); |
200 addTab(LogsView); | 200 addTab(LogsView); |
201 addTab(BandwidthView); | 201 addTab(BandwidthView); |
202 addTab(PrerenderView); | 202 addTab(PrerenderView); |
203 addTab(CrosView); | 203 addTab(CrosView); |
204 addTab(SdchView); | |
Randy Smith (Not in Mondays)
2014/09/29 21:21:56
I think this belongs further up in the list, with
baranovich
2014/09/30 13:16:51
Done.
| |
204 | 205 |
205 this.tabSwitcher_.showMenuItem(LogsView.TAB_ID, cr.isChromeOS); | 206 this.tabSwitcher_.showMenuItem(LogsView.TAB_ID, cr.isChromeOS); |
206 this.tabSwitcher_.showMenuItem(CrosView.TAB_ID, cr.isChromeOS); | 207 this.tabSwitcher_.showMenuItem(CrosView.TAB_ID, cr.isChromeOS); |
207 this.tabSwitcher_.showMenuItem(CrosLogVisualizerView.TAB_ID, | 208 this.tabSwitcher_.showMenuItem(CrosLogVisualizerView.TAB_ID, |
208 cr.isChromeOS); | 209 cr.isChromeOS); |
209 }, | 210 }, |
210 | 211 |
211 /** | 212 /** |
212 * This function is called by the tab switcher when the current tab has been | 213 * This function is called by the tab switcher when the current tab has been |
213 * changed. It will update the current URL to reflect the new active tab, | 214 * changed. It will update the current URL to reflect the new active tab, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
304 EventSourceType = Constants.logSourceType; | 305 EventSourceType = Constants.logSourceType; |
305 EventSourceTypeNames = makeInverseMap(EventSourceType); | 306 EventSourceTypeNames = makeInverseMap(EventSourceType); |
306 LogLevelType = Constants.logLevelType; | 307 LogLevelType = Constants.logLevelType; |
307 ClientInfo = Constants.clientInfo; | 308 ClientInfo = Constants.clientInfo; |
308 LoadFlag = Constants.loadFlag; | 309 LoadFlag = Constants.loadFlag; |
309 NetError = Constants.netError; | 310 NetError = Constants.netError; |
310 QuicError = Constants.quicError; | 311 QuicError = Constants.quicError; |
311 QuicRstStreamError = Constants.quicRstStreamError; | 312 QuicRstStreamError = Constants.quicRstStreamError; |
312 AddressFamily = Constants.addressFamily; | 313 AddressFamily = Constants.addressFamily; |
313 LoadState = Constants.loadState; | 314 LoadState = Constants.loadState; |
315 SdchProblemCode = Constants.sdchProblemCode; | |
314 // certStatusFlag may not be present when loading old log Files | 316 // certStatusFlag may not be present when loading old log Files |
315 if (typeof(Constants.certStatusFlag) == 'object') | 317 if (typeof(Constants.certStatusFlag) == 'object') |
316 CertStatusFlag = Constants.certStatusFlag; | 318 CertStatusFlag = Constants.certStatusFlag; |
317 else | 319 else |
318 CertStatusFlag = {}; | 320 CertStatusFlag = {}; |
319 | 321 |
320 timeutil.setTimeTickOffset(Constants.timeTickOffset); | 322 timeutil.setTimeTickOffset(Constants.timeTickOffset); |
321 }; | 323 }; |
322 | 324 |
323 /** | 325 /** |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
379 * Returns a string representation of |family|. | 381 * Returns a string representation of |family|. |
380 * @param {number} family An AddressFamily | 382 * @param {number} family An AddressFamily |
381 * @return {string} A representation of the given family. | 383 * @return {string} A representation of the given family. |
382 */ | 384 */ |
383 function addressFamilyToString(family) { | 385 function addressFamilyToString(family) { |
384 var str = getKeyWithValue(AddressFamily, family); | 386 var str = getKeyWithValue(AddressFamily, family); |
385 // All the address family start with ADDRESS_FAMILY_*. | 387 // All the address family start with ADDRESS_FAMILY_*. |
386 // Strip that prefix since it is redundant and only clutters the output. | 388 // Strip that prefix since it is redundant and only clutters the output. |
387 return str.replace(/^ADDRESS_FAMILY_/, ''); | 389 return str.replace(/^ADDRESS_FAMILY_/, ''); |
388 } | 390 } |
391 | |
392 /** | |
393 * Returns the name for sdchProblemCode. | |
394 * | |
395 * Example: sdchProblemCodeToString(5) should return | |
396 * "DECODE_BODY_ERROR". | |
397 * @param {number} sdchProblemCode The SDCH problem code. | |
398 * @return {string} The name of the given problem code. | |
399 */ | |
400 function sdchProblemCodeToString(sdchProblemCode) { | |
401 return getKeyWithValue(SdchProblemCode, sdchProblemCode); | |
402 } | |
OLD | NEW |