| OLD | NEW |
| 1 // Copyright (c) 2011 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 localStrings = new LocalStrings(); | 5 localStrings = new LocalStrings(); |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Requests the list of crashes from the backend. | 8 * Requests the list of crashes from the backend. |
| 9 */ | 9 */ |
| 10 function requestCrashes() { | 10 function requestCrashes() { |
| 11 chrome.send('requestCrashList', []) | 11 chrome.send('requestCrashList'); |
| 12 } | 12 } |
| 13 | 13 |
| 14 /** | 14 /** |
| 15 * Callback from backend with the list of crashes. Builds the UI. | 15 * Callback from backend with the list of crashes. Builds the UI. |
| 16 * @param {boolean} enabled Whether or not crash reporting is enabled. | 16 * @param {boolean} enabled Whether or not crash reporting is enabled. |
| 17 * @param {array} crashes The list of crashes. | 17 * @param {array} crashes The list of crashes. |
| 18 * @param {string} version The browser version. | 18 * @param {string} version The browser version. |
| 19 */ | 19 */ |
| 20 function updateCrashList(enabled, crashes, version) { | 20 function updateCrashList(enabled, crashes, version) { |
| 21 $('countBanner').textContent = localStrings.getStringF('crashCountFormat', | 21 $('countBanner').textContent = localStrings.getStringF('crashCountFormat', |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 link.textContent = localStrings.getString('bugLinkText'); | 64 link.textContent = localStrings.getString('bugLinkText'); |
| 65 linkBlock.appendChild(link); | 65 linkBlock.appendChild(link); |
| 66 crashBlock.appendChild(linkBlock); | 66 crashBlock.appendChild(linkBlock); |
| 67 crashSection.appendChild(crashBlock); | 67 crashSection.appendChild(crashBlock); |
| 68 } | 68 } |
| 69 | 69 |
| 70 $('noCrashes').hidden = crashes.length != 0; | 70 $('noCrashes').hidden = crashes.length != 0; |
| 71 } | 71 } |
| 72 | 72 |
| 73 document.addEventListener('DOMContentLoaded', requestCrashes); | 73 document.addEventListener('DOMContentLoaded', requestCrashes); |
| OLD | NEW |