diff options
author | rdevlin.cronin <rdevlin.cronin@chromium.org> | 2015-04-29 15:31:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-29 22:32:11 +0000 |
commit | 20a50f515fb5ce6130ff42afede07476d085ddaa (patch) | |
tree | 02f091baa571349c3fa26ef63a6b1939d6f59e4e | |
parent | eb7659c0e34063fa52b8edec8aa81f244cb7de56 (diff) | |
download | chromium_src-20a50f515fb5ce6130ff42afede07476d085ddaa.zip chromium_src-20a50f515fb5ce6130ff42afede07476d085ddaa.tar.gz chromium_src-20a50f515fb5ce6130ff42afede07476d085ddaa.tar.bz2 |
[Extensions Page UI] Remove query string on icon urls
Since we moved to using data urls for icons, we don't need to use a query
string in the url for the icon to prevent caching.
- Using it breaks the format, so the icon isn't displayed.
- If the browser wants to cache an image for a particular icon url (unlikely),
it's now okay because any icon with the same url is, by definition, the same
icon.
BUG=482361
Review URL: https://codereview.chromium.org/1115023002
Cr-Commit-Position: refs/heads/master@{#327600}
-rw-r--r-- | chrome/browser/resources/extensions/extension_list.js | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/chrome/browser/resources/extensions/extension_list.js b/chrome/browser/resources/extensions/extension_list.js index c8a895f..2ff7a24 100644 --- a/chrome/browser/resources/extensions/extension_list.js +++ b/chrome/browser/resources/extensions/extension_list.js @@ -185,14 +185,6 @@ cr.define('extensions', function() { return div; } - /** - * @type {Object<string, number>} A map from extension id to last reloaded - * timestamp. The timestamp is recorded when the user click the 'Reload' - * link. It is used to refresh the icon of an unpacked extension. - * This persists between calls to decorate. - */ - var extensionReloadedTimestamp = {}; - ExtensionList.prototype = { __proto__: HTMLDivElement.prototype, @@ -549,7 +541,6 @@ cr.define('extensions', function() { // The 'Reload' link. row.setupColumn('.reload-link', 'localReload', 'click', function(e) { chrome.developerPrivate.reload(extension.id, {failQuietly: true}); - extensionReloadedTimestamp[extension.id] = Date.now(); }); // The 'Launch' link. @@ -677,16 +668,7 @@ cr.define('extensions', function() { row.id == this.getIdQueryParam_()); var item = row.querySelector('.extension-list-item'); - // Prevent the image cache of extension icon by using the reloaded - // timestamp as a query string. The timestamp is recorded when the user - // clicks the 'Reload' link. http://crbug.com/159302. - if (extensionReloadedTimestamp[extension.id]) { - item.style.backgroundImage = - 'url(' + extension.iconUrl + '?' + - extensionReloadedTimestamp[extension.id] + ')'; - } else { - item.style.backgroundImage = 'url(' + extension.iconUrl + ')'; - } + item.style.backgroundImage = 'url(' + extension.iconUrl + ')'; this.setText_(row, '.extension-title', extension.name); this.setText_(row, '.extension-version', extension.version); |