| 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). | 7 * updated on load log). |
| 8 */ | 8 */ |
| 9 var LogEventType = null; | 9 var LogEventType = null; |
| 10 var LogEventPhase = null; | 10 var LogEventPhase = null; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 }, | 181 }, |
| 182 | 182 |
| 183 switchToViewOnlyMode: function() { | 183 switchToViewOnlyMode: function() { |
| 184 // Since this won't be dumped to a file, we don't want to remove | 184 // Since this won't be dumped to a file, we don't want to remove |
| 185 // cookies and credentials. | 185 // cookies and credentials. |
| 186 log_util.createLogDumpAsync('', log_util.loadLogFile, false); | 186 log_util.createLogDumpAsync('', log_util.loadLogFile, false); |
| 187 }, | 187 }, |
| 188 | 188 |
| 189 stopCapturing: function() { | 189 stopCapturing: function() { |
| 190 g_browser.disable(); | 190 g_browser.disable(); |
| 191 document.styleSheets[0].insertRule('.hideOnLoadLog { display: none; }'); | 191 document.styleSheets[0].insertRule( |
| 192 '.hide-when-not-capturing { display: none; }'); |
| 192 } | 193 } |
| 193 }; | 194 }; |
| 194 | 195 |
| 195 /** | 196 /** |
| 196 * Takes the current hash in form of "#tab¶m1=value1¶m2=value2&...". | 197 * Takes the current hash in form of "#tab¶m1=value1¶m2=value2&...". |
| 197 * Puts the parameters in an object, and passes the resulting object to | 198 * Puts the parameters in an object, and passes the resulting object to |
| 198 * |categoryTabSwitcher|. Uses tab and |anchorMap| to find a tab ID, | 199 * |categoryTabSwitcher|. Uses tab and |anchorMap| to find a tab ID, |
| 199 * which it also passes to the tab switcher. | 200 * which it also passes to the tab switcher. |
| 200 * | 201 * |
| 201 * Parameters and values are decoded with decodeURIComponent(). | 202 * Parameters and values are decoded with decodeURIComponent(). |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 | 285 |
| 285 /** | 286 /** |
| 286 * Returns a string representation of |family|. | 287 * Returns a string representation of |family|. |
| 287 */ | 288 */ |
| 288 function addressFamilyToString(family) { | 289 function addressFamilyToString(family) { |
| 289 var str = getKeyWithValue(AddressFamily, family); | 290 var str = getKeyWithValue(AddressFamily, family); |
| 290 // All the address family start with ADDRESS_FAMILY_*. | 291 // All the address family start with ADDRESS_FAMILY_*. |
| 291 // Strip that prefix since it is redundant and only clutters the output. | 292 // Strip that prefix since it is redundant and only clutters the output. |
| 292 return str.replace(/^ADDRESS_FAMILY_/, ''); | 293 return str.replace(/^ADDRESS_FAMILY_/, ''); |
| 293 } | 294 } |
| OLD | NEW |