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

Side by Side Diff: chrome/browser/resources/crashes.js

Issue 219383008: chrome://crashes: support showing the product name per crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use localized product id Created 6 years, 8 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/webui/crashes_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /* Id for tracking automatic refresh of crash list. */ 5 /* Id for tracking automatic refresh of crash list. */
6 var refreshCrashListId = undefined; 6 var refreshCrashListId = undefined;
7 7
8 /** 8 /**
9 * Requests the list of crashes from the backend. 9 * Requests the list of crashes from the backend.
10 */ 10 */
(...skipping 17 matching lines...) Expand all
28 $('enabledMode').hidden = !enabled; 28 $('enabledMode').hidden = !enabled;
29 $('disabledMode').hidden = enabled; 29 $('disabledMode').hidden = enabled;
30 $('crashUploadStatus').hidden = !enabled || !dynamicBackend; 30 $('crashUploadStatus').hidden = !enabled || !dynamicBackend;
31 31
32 if (!enabled) 32 if (!enabled)
33 return; 33 return;
34 34
35 // Clear any previous list. 35 // Clear any previous list.
36 crashSection.textContent = ''; 36 crashSection.textContent = '';
37 37
38 var productName = loadTimeData.getString('shortProductName');
39
38 for (var i = 0; i < crashes.length; i++) { 40 for (var i = 0; i < crashes.length; i++) {
39 var crash = crashes[i]; 41 var crash = crashes[i];
42 if (crash['local_id'] == '')
43 crash['local_id'] = productName;
40 44
41 var crashBlock = document.createElement('div'); 45 var crashBlock = document.createElement('div');
42 var title = document.createElement('h3'); 46 var title = document.createElement('h3');
43 title.textContent = loadTimeData.getStringF('crashHeaderFormat', 47 title.textContent = loadTimeData.getStringF('crashHeaderFormat',
44 crash['id']); 48 crash['id'],
49 crash['local_id']);
45 crashBlock.appendChild(title); 50 crashBlock.appendChild(title);
46 var date = document.createElement('p'); 51 var date = document.createElement('p');
47 date.textContent = loadTimeData.getStringF('crashTimeFormat', 52 date.textContent = loadTimeData.getStringF('crashTimeFormat',
48 crash['time']); 53 crash['time']);
49 crashBlock.appendChild(date); 54 crashBlock.appendChild(date);
50 var linkBlock = document.createElement('p'); 55 var linkBlock = document.createElement('p');
51 var link = document.createElement('a'); 56 var link = document.createElement('a');
52 var commentLines = [ 57 var commentLines = [
53 'Chrome Version: ' + version, 58 'Chrome Version: ' + version,
54 // TODO(tbreisacher): fill in the OS automatically? 59 // TODO(tbreisacher): fill in the OS automatically?
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 103
99 // Trigger a refresh in 5 seconds. Clear any previous requests. 104 // Trigger a refresh in 5 seconds. Clear any previous requests.
100 clearTimeout(refreshCrashListId); 105 clearTimeout(refreshCrashListId);
101 refreshCrashListId = setTimeout(requestCrashes, 5000); 106 refreshCrashListId = setTimeout(requestCrashes, 5000);
102 } 107 }
103 108
104 document.addEventListener('DOMContentLoaded', function() { 109 document.addEventListener('DOMContentLoaded', function() {
105 $('uploadCrashes').onclick = requestCrashUpload; 110 $('uploadCrashes').onclick = requestCrashUpload;
106 requestCrashes(); 111 requestCrashes();
107 }); 112 });
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/webui/crashes_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698