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

Unified Diff: chrome/browser/resources/md_downloads/item.js

Issue 2455393004: MD Downloads: reduce the size of the ellided, displayed download URL (Closed)
Patch Set: Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
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 3bc1ef68599e13175d4180c897b25254e52ccad4..22c95d6d86578aaeb2836bea02d654f2826a6027 100644
--- a/chrome/browser/resources/md_downloads/item.js
+++ b/chrome/browser/resources/md_downloads/item.js
@@ -78,6 +78,16 @@ cr.define('downloads', function() {
this.content = this.$.content;
},
+ /**
+ * @param {string} text
+ * @param {number} maxLength
+ * @return {string} A string that's as long (or shorter) than |maxLength|.
+ * @private
+ */
+ chopString_: function(text, maxLength) {
dpapad 2016/10/29 00:53:15 Nit (optional): Perhaps don't bother passing the m
Dan Beam 2016/10/29 01:00:52 Done.
+ return text.slice(0, maxLength);
+ },
+
/** @private */
computeClass_: function() {
var classes = [];
« no previous file with comments | « chrome/browser/resources/md_downloads/item.html ('k') | chrome/browser/resources/md_downloads/vulcanized.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698