Index: chrome/browser/resources/options/origin_resources_list.js |
diff --git a/chrome/browser/resources/options/origin_resources_list.js b/chrome/browser/resources/options/origin_resources_list.js |
index 62efad450a330719bf81cc1351ae61a2cb4b5aa9..583fdeb3783d5fff5caf416c57992c0e2a13af12 100644 |
--- a/chrome/browser/resources/options/origin_resources_list.js |
+++ b/chrome/browser/resources/options/origin_resources_list.js |
@@ -8,7 +8,15 @@ cr.define('options', function() { |
function OriginListItem(origin) { |
var el = cr.doc.createElement('div'); |
- el.origin_ = origin; |
+ |
+ if (origin.origin) { |
+ el.origin_ = origin.origin; |
+ el.usage_ = origin.usage; |
+ el.usage_string_ = origin.usage_string; |
+ } |
+ else |
Bernhard Bauer
2014/07/21 11:29:29
If you have braces for the if clause, also use bra
Daniel Nishi
2014/07/21 17:53:36
Done.
|
+ el.origin_ = origin; |
+ |
el.__proto__ = OriginListItem.prototype; |
el.decorate(); |
return el; |
@@ -21,8 +29,7 @@ cr.define('options', function() { |
decorate: function() { |
ListItem.prototype.decorate.call(this); |
- this.classList.add('deletable-item'); |
- |
+ this.className = 'deletable-item origin-list-item'; |
this.contentElement_ = this.ownerDocument.createElement('div'); |
this.appendChild(this.contentElement_); |
@@ -31,6 +38,13 @@ cr.define('options', function() { |
titleEl.textContent = this.origin_; |
titleEl.style.backgroundImage = getFaviconImageSet(this.origin_); |
this.contentElement_.appendChild(titleEl); |
+ |
+ if (this.usage_string_) { |
+ var usageEl = this.ownerDocument.createElement('span'); |
+ usageEl.className = 'usage'; |
+ usageEl.textContent = this.usage_string_; |
+ this.appendChild(usageEl); |
+ } |
} |
}; |