Chromium Code Reviews| 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'); |
|
Dan Beam
2012/04/05 22:24:13
yay, it works!
Tyler Breisacher (Chromium)
2012/04/05 22:49:55
It's like you don't have faith in my ability to wr
Dan Beam
2012/04/06 02:58:29
I do now! :P
| |
| 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 30 matching lines...) Expand all Loading... | |
| 52 'Operating%20System:%20e.g.,%20"Windows%207",%20' + | 52 'Operating%20System:%20e.g.,%20"Windows%207",%20' + |
| 53 '"Mac%20OS%20X%2010.6"%0A%0A' + | 53 '"Mac%20OS%20X%2010.6"%0A%0A' + |
| 54 'URL%20(if%20applicable)%20where%20crash%20occurred:%20%0A%0A' + | 54 'URL%20(if%20applicable)%20where%20crash%20occurred:%20%0A%0A' + |
| 55 'Can%20you%20reproduce%20this%20crash?%0A%0A' + | 55 'Can%20you%20reproduce%20this%20crash?%0A%0A' + |
| 56 'What%20steps%20will%20reproduce%20this%20crash%20' + | 56 'What%20steps%20will%20reproduce%20this%20crash%20' + |
| 57 '(or%20if%20it\'s%20not%20reproducible,%20what%20were%20you%20doing' + | 57 '(or%20if%20it\'s%20not%20reproducible,%20what%20were%20you%20doing' + |
| 58 '%20just%20before%20the%20crash)?%0A1.%0A2.%0A3.%0A%0A' + | 58 '%20just%20before%20the%20crash)?%0A1.%0A2.%0A3.%0A%0A' + |
| 59 '*Please%20note%20that%20issues%20filed%20with%20no%20information%20' + | 59 '*Please%20note%20that%20issues%20filed%20with%20no%20information%20' + |
| 60 'filled%20in%20above%20will%20be%20marked%20as%20WontFix*%0A%0A' + | 60 'filled%20in%20above%20will%20be%20marked%20as%20WontFix*%0A%0A' + |
| 61 '****DO%20NOT%20CHANGE%20BELOW%20THIS%20LINE****%0Areport_id:' + | 61 '****DO%20NOT%20CHANGE%20BELOW%20THIS%20LINE****%0Areport_id:' + |
| 62 crash['id']; | 62 crash['id']; |
|
Dan Beam
2012/04/05 22:24:13
lern2encodeURIComponent or appendParam() http://co
| |
| 63 link.target = '_blank'; | 63 link.target = '_blank'; |
| 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 |