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

Unified Diff: chrome/browser/resources/downloads/downloads.js

Issue 10918274: chrome://downloads updateDateDisplay more often (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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 | « no previous file | chrome/common/time_format.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/downloads/downloads.js
diff --git a/chrome/browser/resources/downloads/downloads.js b/chrome/browser/resources/downloads/downloads.js
index 9eac064f8ad58c9a78f704f8378cc97dc306d7a9..3f96887e1f41bcc816028732182ad277bb0756f3 100644
--- a/chrome/browser/resources/downloads/downloads.js
+++ b/chrome/browser/resources/downloads/downloads.js
@@ -104,8 +104,13 @@ Downloads.prototype.updated = function(download) {
} else {
this.node_.appendChild(this.downloads_[id].node);
}
- this.updateDateDisplay_();
}
+ // Download.prototype.update may change its nodeSince_ and nodeDate_, so
+ // update all the date displays.
+ // TODO(benjhayden) Only do this if its nodeSince_ or nodeDate_ actually did
+ // change since this may touch 150 elements and Downloads.prototype.updated
+ // may be called 150 times.
+ this.updateDateDisplay_();
};
/**
« no previous file with comments | « no previous file | chrome/common/time_format.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698