OLD | NEW |
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 /** | 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 return; | 328 return; |
329 | 329 |
330 this.dangerous = createChild('div', 'dangerousprompt', this.rowbutton); | 330 this.dangerous = createChild('div', 'dangerousprompt', this.rowbutton); |
331 | 331 |
332 // Handle dangerous files, extensions and dangerous urls. | 332 // Handle dangerous files, extensions and dangerous urls. |
333 var dangerText; | 333 var dangerText; |
334 if (dangerType == 'DANGEROUS_URL') { | 334 if (dangerType == 'DANGEROUS_URL') { |
335 dangerText = localStrings.getString('dangerousurl'); | 335 dangerText = localStrings.getString('dangerousurl'); |
336 } else if (dangerType == 'DANGEROUS_CONTENT') { | 336 } else if (dangerType == 'DANGEROUS_CONTENT') { |
337 dangerText = localStrings.getStringF('dangerouscontent', this.name); | 337 dangerText = localStrings.getStringF('dangerouscontent', this.name); |
| 338 } else if (dangerType == 'UNCOMMON_CONTENT') { |
| 339 dangerText = localStrings.getStringF('uncommoncontent', this.name); |
338 } else if (dangerType == 'DANGEROUS_FILE' && this.path.match(/\.crx$/)) { | 340 } else if (dangerType == 'DANGEROUS_FILE' && this.path.match(/\.crx$/)) { |
339 dangerText = localStrings.getString('dangerousextension'); | 341 dangerText = localStrings.getString('dangerousextension'); |
340 } else { | 342 } else { |
341 dangerText = localStrings.getStringF('dangerousfile', this.name); | 343 dangerText = localStrings.getStringF('dangerousfile', this.name); |
342 } | 344 } |
343 createChild('span', 'dangerousprompttext', this.dangerous, dangerText); | 345 createChild('span', 'dangerousprompttext', this.dangerous, dangerText); |
344 | 346 |
345 var self = this; | 347 var self = this; |
346 createChild('span', 'confirm', this.dangerous, | 348 createChild('span', 'confirm', this.dangerous, |
347 localStrings.getString('discard'), | 349 localStrings.getString('discard'), |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 update: function(result) { | 626 update: function(result) { |
625 var row = this.getRow(result.file_path); | 627 var row = this.getRow(result.file_path); |
626 if (!row && !DiscardResult(result)) | 628 if (!row && !DiscardResult(result)) |
627 row = new DownloadRow(this, result); | 629 row = new DownloadRow(this, result); |
628 | 630 |
629 row && row.update(result); | 631 row && row.update(result); |
630 }, | 632 }, |
631 }; | 633 }; |
632 | 634 |
633 document.addEventListener('DOMContentLoaded', init); | 635 document.addEventListener('DOMContentLoaded', init); |
OLD | NEW |