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

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

Issue 2200233003: MD History: Refresh the list when clearing browsing data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revise test Created 4 years, 4 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_list.js
diff --git a/chrome/browser/resources/md_history/history_list.js b/chrome/browser/resources/md_history/history_list.js
index 11b59112e52d82afcd77d6f342b1d7140d652865..1ab8a7a94633fd8365193247fbf4fb2588d10249 100644
--- a/chrome/browser/resources/md_history/history_list.js
+++ b/chrome/browser/resources/md_history/history_list.js
@@ -14,8 +14,6 @@ Polymer({
value: '',
},
- lastSearchedTerm_: String,
-
querying: Boolean,
// An array of history entries in reverse chronological order.
@@ -70,18 +68,19 @@ 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.
*/
- addNewResults: function(historyResults) {
+ addNewResults: function(historyResults, incremental) {
var results = historyResults.slice();
/** @type {IronScrollThresholdElement} */(this.$['scroll-threshold'])
.clearTriggers();
- if (this.lastSearchedTerm_ != this.searchedTerm) {
+ if (!incremental) {
this.resultLoadingDisabled_ = false;
if (this.historyData_)
this.splice('historyData_', 0, this.historyData_.length);
this.fire('unselect-all');
- this.lastSearchedTerm_ = this.searchedTerm;
}
if (this.historyData_) {
« no previous file with comments | « chrome/browser/resources/md_history/history.js ('k') | chrome/browser/resources/md_history/list_container.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698