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

Side by Side Diff: chrome/browser/resources/md_downloads/item.js

Issue 2537893004: Remove XSS from chrome://downloads (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « chrome/browser/resources/md_downloads/crisper.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 cr.define('downloads', function() { 5 cr.define('downloads', function() {
6 var Item = Polymer({ 6 var Item = Polymer({
7 is: 'downloads-item', 7 is: 'downloads-item',
8 8
9 properties: { 9 properties: {
10 data: { 10 data: {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 !this.data.file_externally_removed; 109 !this.data.file_externally_removed;
110 }, 110 },
111 111
112 /** @private */ 112 /** @private */
113 computeControlledBy_: function() { 113 computeControlledBy_: function() {
114 if (!this.data.by_ext_id || !this.data.by_ext_name) 114 if (!this.data.by_ext_id || !this.data.by_ext_name)
115 return ''; 115 return '';
116 116
117 var url = 'chrome://extensions#' + this.data.by_ext_id; 117 var url = 'chrome://extensions#' + this.data.by_ext_id;
118 var name = this.data.by_ext_name; 118 var name = this.data.by_ext_name;
119 return loadTimeData.getStringF('controlledByUrl', url, name); 119 return loadTimeData.getStringF('controlledByUrl', url, HTMLEscape(name));
120 }, 120 },
121 121
122 /** @private */ 122 /** @private */
123 computeDangerIcon_: function() { 123 computeDangerIcon_: function() {
124 return this.isDangerous_ ? 'cr:warning' : ''; 124 return this.isDangerous_ ? 'cr:warning' : '';
125 }, 125 },
126 126
127 /** @private */ 127 /** @private */
128 computeDate_: function() { 128 computeDate_: function() {
129 assert(typeof this.data.hideDate == 'boolean'); 129 assert(typeof this.data.hideDate == 'boolean');
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 }, 311 },
312 312
313 /** @private */ 313 /** @private */
314 onShowTap_: function() { 314 onShowTap_: function() {
315 downloads.ActionService.getInstance().show(this.data.id); 315 downloads.ActionService.getInstance().show(this.data.id);
316 }, 316 },
317 }); 317 });
318 318
319 return {Item: Item}; 319 return {Item: Item};
320 }); 320 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_downloads/crisper.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698