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

Unified Diff: chrome/browser/resources/extensions/extension_list.js

Issue 12225147: Fix a bug where an extension's icon wasn't being properly reloaded if it changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jsdoc comments, postincrement change Created 7 years, 10 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
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/extensions/extension_list.js
diff --git a/chrome/browser/resources/extensions/extension_list.js b/chrome/browser/resources/extensions/extension_list.js
index ddf6d215637018c9368dd0e2a307b7f06735f861..193521188d3a2c0e304b73390354c6832c2dbc80 100644
--- a/chrome/browser/resources/extensions/extension_list.js
+++ b/chrome/browser/resources/extensions/extension_list.js
@@ -35,6 +35,12 @@ cr.define('options', function() {
ExtensionsList.prototype = {
__proto__: HTMLDivElement.prototype,
+ /**
+ * @type {number} Appended to icon URL as a query string to prevent
+ * the icon from caching. Increments each time an extension is reloaded.
+ */
+ iconQueryId_: 0,
+
/** @override */
decorate: function() {
this.textContent = '';
@@ -97,7 +103,8 @@ cr.define('options', function() {
node.classList.add('extension-highlight');
var item = node.querySelector('.extension-list-item');
- item.style.backgroundImage = 'url(' + extension.icon + ')';
+ item.style.backgroundImage = 'url(' + extension.icon + '?' +
+ this.iconQueryId_++ + ')';
not at google - send to devlin 2013/02/13 01:59:31 Ah I see - is the problem just that the background
not at google - send to devlin 2013/02/13 02:05:27 Ok I straight away realised this was dumb, since t
epeterson 2013/02/14 01:09:23 I've just tried these suggestions, and, unfortunat
var title = node.querySelector('.extension-title');
title.textContent = extension.name;
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698