| Index: chrome/browser/resources/md_downloads/crisper.js
|
| diff --git a/chrome/browser/resources/md_downloads/crisper.js b/chrome/browser/resources/md_downloads/crisper.js
|
| index 39d9b3d1b7df8ba15c8db64ba931372d2eac9b3e..11e1afeeae44ee03a31830ab02adf2ea2978bbdc 100644
|
| --- a/chrome/browser/resources/md_downloads/crisper.js
|
| +++ b/chrome/browser/resources/md_downloads/crisper.js
|
| @@ -1468,8 +1468,17 @@ function appendParam(url, key, value) {
|
| }
|
|
|
| /**
|
| + * A regular expression for identifying favicon URLs.
|
| + * @const {!RegExp}
|
| + * TODO(dpapad): Move all favicon related methods to a new favicon_util.js file
|
| + * and make this RegExp private.
|
| + */
|
| +var FAVICON_URL_REGEX = /\.ico$/i;
|
| +
|
| +/**
|
| * Creates a CSS -webkit-image-set for a favicon request.
|
| - * @param {string} url The url for the favicon.
|
| + * @param {string} url Either the URL of the original page or of the favicon
|
| + * itself.
|
| * @param {number=} opt_size Optional preferred size of the favicon.
|
| * @param {string=} opt_type Optional type of favicon to request. Valid values
|
| * are 'favicon' and 'touch-icon'. Default is 'favicon'.
|
| @@ -1478,26 +1487,12 @@ function appendParam(url, key, value) {
|
| function getFaviconImageSet(url, opt_size, opt_type) {
|
| var size = opt_size || 16;
|
| var type = opt_type || 'favicon';
|
| - return imageset(
|
| - 'chrome://' + type + '/size/' + size + '@scalefactorx/' + url);
|
| -}
|
|
|
| -/**
|
| - * Creates a new URL for a favicon request for the current device pixel ratio.
|
| - * The URL must be updated when the user moves the browser to a screen with a
|
| - * different device pixel ratio. Use getFaviconImageSet() for the updating to
|
| - * occur automatically.
|
| - * @param {string} url The url for the favicon.
|
| - * @param {number=} opt_size Optional preferred size of the favicon.
|
| - * @param {string=} opt_type Optional type of favicon to request. Valid values
|
| - * are 'favicon' and 'touch-icon'. Default is 'favicon'.
|
| - * @return {string} Updated URL for the favicon.
|
| - */
|
| -function getFaviconUrlForCurrentDevicePixelRatio(url, opt_size, opt_type) {
|
| - var size = opt_size || 16;
|
| - var type = opt_type || 'favicon';
|
| - return 'chrome://' + type + '/size/' + size + '@' +
|
| - window.devicePixelRatio + 'x/' + url;
|
| + return imageset(
|
| + 'chrome://' + type + '/size/' + size + '@scalefactorx/' +
|
| + // Note: Literal 'iconurl' must match |kIconURLParameter| in
|
| + // components/favicon_base/favicon_url_parser.cc.
|
| + (FAVICON_URL_REGEX.test(url) ? 'iconurl/' : '') + url);
|
| }
|
|
|
| /**
|
|
|