| Index: chrome/browser/resources/md_history/history_list.js
|
| diff --git a/chrome/browser/resources/md_history/history_list.js b/chrome/browser/resources/md_history/history_list.js
|
| index 11b59112e52d82afcd77d6f342b1d7140d652865..ca84834584515dd1a6f345e84ca4d4099814bc30 100644
|
| --- a/chrome/browser/resources/md_history/history_list.js
|
| +++ b/chrome/browser/resources/md_history/history_list.js
|
| @@ -18,6 +18,11 @@ Polymer({
|
|
|
| querying: Boolean,
|
|
|
| + clearingHistory_: {
|
| + type: Boolean,
|
| + value: false,
|
| + },
|
| +
|
| // An array of history entries in reverse chronological order.
|
| historyData_: Array,
|
|
|
| @@ -70,13 +75,24 @@ Polymer({
|
| * Adds the newly updated history results into historyData_. Adds new fields
|
| * for each result.
|
| * @param {!Array<!HistoryEntry>} historyResults The new history results.
|
| + * @param {boolean} incremental Whether the result is from loading more
|
| + * history, or a new search/list reload.
|
| + * @param {number} selectedCount Number of selected items.
|
| */
|
| - addNewResults: function(historyResults) {
|
| + addNewResults: function(historyResults, incremental, selectedCount) {
|
| var results = historyResults.slice();
|
| /** @type {IronScrollThresholdElement} */(this.$['scroll-threshold'])
|
| .clearTriggers();
|
|
|
| - if (this.lastSearchedTerm_ != this.searchedTerm) {
|
| + // Do not reload the list when clearing browsing data and there are items
|
| + // checked.
|
| + if (this.clearingHistory_) {
|
| + this.clearingHistory_ = false;
|
| + if (selectedCount > 0)
|
| + return;
|
| + }
|
| +
|
| + if (!incremental) {
|
| this.resultLoadingDisabled_ = false;
|
| if (this.historyData_)
|
| this.splice('historyData_', 0, this.historyData_.length);
|
| @@ -96,6 +112,10 @@ Polymer({
|
| }
|
| },
|
|
|
| + clearingHistory: function() {
|
| + this.clearingHistory_ = true;
|
| + },
|
| +
|
| /**
|
| * Called when the page is scrolled to near the bottom of the list.
|
| * @private
|
|
|