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

Unified Diff: chrome/browser/resources/md_history/history_card.js

Issue 1586373002: MD History: Delete button in the toolbar allows deletion of multiple history-items. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@patch_to_be_uploaded
Patch Set: Fix supervised user test. Created 4 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
Index: chrome/browser/resources/md_history/history_card.js
diff --git a/chrome/browser/resources/md_history/history_card.js b/chrome/browser/resources/md_history/history_card.js
index 06332cb1961d6b636fdcf677e6a4d3ded4e2f8ea..3df08cf81ea9b20f05a867ce4c35df020b12893a 100644
--- a/chrome/browser/resources/md_history/history_card.js
+++ b/chrome/browser/resources/md_history/history_card.js
@@ -24,10 +24,12 @@ Polymer({
* Check whether the time difference between the given historyItem and the
* next one is large enough for a spacer to be required.
* @param {number} index The index number of the first item being compared.
+ * @param {number} itemsLength The number of items on the card. Used to force
+ * needsTimeGap_ to run for every item if an item is deleted from the card.
* @return {boolean} Whether or not time gap separator is required.
* @private
*/
- needsTimeGap_: function(index) {
+ needsTimeGap_: function(index, itemsLength) {
var items = this.historyItems;
return index + 1 < items.length &&
items[index].time - items[index + 1].time > BROWSING_GAP_TIME;
« no previous file with comments | « chrome/browser/resources/md_history/history_card.html ('k') | chrome/browser/resources/md_history/history_card_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698