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

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

Issue 8624008: Make malicious content download warning include the download filename (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Address Asanka's comment. Created 9 years, 1 month 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/resources/downloads.js » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 * Wrapper for chrome.send. 6 * Wrapper for chrome.send.
7 */ 7 */
8 function chromeSend(func, arg) { 8 function chromeSend(func, arg) {
9 if (arg == undefined) 9 if (arg == undefined)
10 arg = ''; 10 arg = '';
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 375
376 DANGEROUS_HEIGHT: 60, 376 DANGEROUS_HEIGHT: 60,
377 createDangerousPrompt_: function(dangerType) { 377 createDangerousPrompt_: function(dangerType) {
378 if (this.dangerous) 378 if (this.dangerous)
379 return; 379 return;
380 380
381 this.dangerous = createChild('div', 'dangerousprompt', this.rowbutton); 381 this.dangerous = createChild('div', 'dangerousprompt', this.rowbutton);
382 382
383 // Handle dangerous files, extensions and dangerous urls. 383 // Handle dangerous files, extensions and dangerous urls.
384 var dangerText; 384 var dangerText;
385 if (dangerType == 'DANGEROUS_URL' || dangerType == 'DANGEROUS_CONTENT') { 385 if (dangerType == 'DANGEROUS_URL') {
386 dangerText = localStrings.getString('dangerousurl'); 386 dangerText = localStrings.getString('dangerousurl');
387 } else if (dangerType == 'DANGEROUS_CONTENT') {
388 dangerText = localStrings.getStringF('dangerouscontent', this.name);
387 } else if (dangerType == 'DANGEROUS_FILE' && this.path.match(/\.crx$/)) { 389 } else if (dangerType == 'DANGEROUS_FILE' && this.path.match(/\.crx$/)) {
388 dangerText = localStrings.getString('dangerousextension'); 390 dangerText = localStrings.getString('dangerousextension');
389 } else { 391 } else {
390 dangerText = localStrings.getStringF('dangerousfile', this.name); 392 dangerText = localStrings.getStringF('dangerousfile', this.name);
391 } 393 }
392 createChild('span', 'dangerousprompttext', this.dangerous, dangerText); 394 createChild('span', 'dangerousprompttext', this.dangerous, dangerText);
393 395
394 var self = this; 396 var self = this;
395 createChild('span', 'confirm', this.dangerous, 397 createChild('span', 'confirm', this.dangerous,
396 localStrings.getString('discard'), 398 localStrings.getString('discard'),
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 update: function(result) { 671 update: function(result) {
670 var row = this.getRow(result.file_path); 672 var row = this.getRow(result.file_path);
671 if (!row && !DiscardResult(result)) 673 if (!row && !DiscardResult(result))
672 row = new DownloadRow(this, result); 674 row = new DownloadRow(this, result);
673 675
674 row && row.update(result); 676 row && row.update(result);
675 }, 677 },
676 }; 678 };
677 679
678 document.addEventListener('DOMContentLoaded', init); 680 document.addEventListener('DOMContentLoaded', init);
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/resources/downloads.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698