Chromium Code Reviews| Index: chrome/browser/resources/shared/js/util.js |
| diff --git a/chrome/browser/resources/shared/js/util.js b/chrome/browser/resources/shared/js/util.js |
| index 1a927d1a6ee7f768a79cbc80b166090f9afeb2b3..73e06eae5cbf2e35a43b8998b91afa69be4e71bd 100644 |
| --- a/chrome/browser/resources/shared/js/util.js |
| +++ b/chrome/browser/resources/shared/js/util.js |
| @@ -226,3 +226,15 @@ function appendParam(url, key, value) { |
| return url + '?' + param; |
| return url + '&' + param; |
| } |
| + |
| +/** |
| + * Creates a new URL for a favicon request. |
| + * @param {string} url The url for the favicon. |
| + * @param {number=} opt_size Optional preferred size of the favicon. |
| + * @return {string} Updated URL for the favicon. |
| + */ |
| +function getFaviconURL(url, opt_size) { |
| + var size = opt_size ? opt_size : 16; |
|
Evan Stade
2012/09/19 12:59:40
var size = opt_size || 16;
kevers
2012/09/19 13:36:57
Done.
|
| + return 'chrome://favicon/size/' + size + '@' + |
| + window.devicePixelRatio + 'x/' + url; |
| +} |