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

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: 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..e2e083b427674b45d10b648426e5bab1369c207a 100644
--- a/chrome/browser/resources/extensions/extension_list.js
+++ b/chrome/browser/resources/extensions/extension_list.js
@@ -35,6 +35,10 @@ cr.define('options', function() {
ExtensionsList.prototype = {
__proto__: HTMLDivElement.prototype,
+ // Appended to icon URL as a query string to prevent icon caching.
+ // Increments each time an extension is reloaded.
not at google - send to devlin 2013/02/12 22:57:52 use jsdoc style /** * @type {number} Appended to
epeterson 2013/02/12 23:52:42 Done.
+ iconQueryId_: 0,
+
/** @override */
decorate: function() {
this.textContent = '';
@@ -97,7 +101,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/12 22:57:52 I think () around ++this.iconQueryId_ are unnecess
epeterson 2013/02/12 23:52:42 Done.
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