diff options
author | akuegel@chromium.org <akuegel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-16 18:34:55 +0000 |
---|---|---|
committer | akuegel@chromium.org <akuegel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-16 18:34:55 +0000 |
commit | 242417748c8d8c62761954c7a28cd0af659e6dba (patch) | |
tree | 75c48892f18d4fe278ae4a357aa822d1c2947eb9 /ui/webui | |
parent | ae6f005a1406c18f035cb733b486c87a484a4782 (diff) | |
download | chromium_src-242417748c8d8c62761954c7a28cd0af659e6dba.zip chromium_src-242417748c8d8c62761954c7a28cd0af659e6dba.tar.gz chromium_src-242417748c8d8c62761954c7a28cd0af659e6dba.tar.bz2 |
Replace own callback handling with Promises.
Simplify the code by using DOM Promises.
BUG=282464
TEST=browser_tests
Review URL: https://codereview.chromium.org/132013002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245264 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/webui')
-rw-r--r-- | ui/webui/resources/js/util.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/webui/resources/js/util.js b/ui/webui/resources/js/util.js index ade780d..ebcf90c 100644 --- a/ui/webui/resources/js/util.js +++ b/ui/webui/resources/js/util.js @@ -401,11 +401,11 @@ function HTMLEscape(original) { * @param {string} original The original string. * @param {number} maxLength The maximum length allowed for the string. * @return {string} The original string if its length does not exceed - * |maxLength|. Otherwise the first |maxLength| - 3 characters with '...' + * |maxLength|. Otherwise the first |maxLength| - 1 characters with '...' * appended. */ function elide(original, maxLength) { if (original.length <= maxLength) return original; - return original.substring(0, maxLength - 3) + '...'; + return original.substring(0, maxLength - 1) + '\u2026'; } |