| Index: chrome/browser/resources/md_downloads/item.js
|
| diff --git a/chrome/browser/resources/md_downloads/item.js b/chrome/browser/resources/md_downloads/item.js
|
| index 032776e06bf9e64c49bda4eabf0e2f267e6ac1b0..2ad8d317722a96eae58a06037166b0e284ce6058 100644
|
| --- a/chrome/browser/resources/md_downloads/item.js
|
| +++ b/chrome/browser/resources/md_downloads/item.js
|
| @@ -147,11 +147,6 @@ cr.define('downloads', function() {
|
| this.set('data_.' + key, data[key]);
|
| }
|
|
|
| - // TODO(dbeam): Move to a computeClass_() method + data binding.
|
| - this.$.content.classList.toggle('is-active', this.isActive_);
|
| - this.$.content.classList.toggle('dangerous', this.isDangerous_);
|
| - this.$.content.classList.toggle('show-progress', this.showProgress_);
|
| -
|
| var desc = this.getDangerText_(data) || this.getStatusText_(data);
|
|
|
| // Status goes in the "tag" (next to the file name) if there's no file.
|
| @@ -174,6 +169,22 @@ cr.define('downloads', function() {
|
| },
|
|
|
| /** @private */
|
| + computeClass_: function() {
|
| + var classes = [];
|
| +
|
| + if (this.isActive_)
|
| + classes.push('is-active');
|
| +
|
| + if (this.isDangerous_)
|
| + classes.push('dangerous');
|
| +
|
| + if (this.showProgress_)
|
| + classes.push('show-progress');
|
| +
|
| + return classes.join(' ');
|
| + },
|
| +
|
| + /** @private */
|
| computeCompletelyOnDisk_: function() {
|
| return this.data_.state == downloads.States.COMPLETE &&
|
| !this.data_.file_externally_removed;
|
|
|