| OLD | NEW |
| 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 Loading... |
| 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') { | 385 if (dangerType == 'DANGEROUS_URL' || dangerType == 'DANGEROUS_CONTENT') { |
| 386 dangerText = localStrings.getString('dangerousurl'); | 386 dangerText = localStrings.getString('dangerousurl'); |
| 387 } else if (dangerType == 'DANGEROUS_FILE' && this.path.match(/\.crx$/)) { | 387 } else if (dangerType == 'DANGEROUS_FILE' && this.path.match(/\.crx$/)) { |
| 388 dangerText = localStrings.getString('dangerousextension'); | 388 dangerText = localStrings.getString('dangerousextension'); |
| 389 } else { | 389 } else { |
| 390 dangerText = localStrings.getStringF('dangerousfile', this.name); | 390 dangerText = localStrings.getStringF('dangerousfile', this.name); |
| 391 } | 391 } |
| 392 createChild('span', 'dangerousprompttext', this.dangerous, dangerText); | 392 createChild('span', 'dangerousprompttext', this.dangerous, dangerText); |
| 393 | 393 |
| 394 var self = this; | 394 var self = this; |
| 395 createChild('span', 'confirm', this.dangerous, | 395 createChild('span', 'confirm', this.dangerous, |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 update: function(result) { | 669 update: function(result) { |
| 670 var row = this.getRow(result.file_path); | 670 var row = this.getRow(result.file_path); |
| 671 if (!row && !DiscardResult(result)) | 671 if (!row && !DiscardResult(result)) |
| 672 row = new DownloadRow(this, result); | 672 row = new DownloadRow(this, result); |
| 673 | 673 |
| 674 row && row.update(result); | 674 row && row.update(result); |
| 675 }, | 675 }, |
| 676 }; | 676 }; |
| 677 | 677 |
| 678 document.addEventListener('DOMContentLoaded', init); | 678 document.addEventListener('DOMContentLoaded', init); |
| OLD | NEW |