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

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

Issue 2656443004: MD History: Add routing for grouped history mode. (Closed)
Patch Set: Review comments Created 3 years, 11 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/list_container.js
diff --git a/chrome/browser/resources/md_history/list_container.js b/chrome/browser/resources/md_history/list_container.js
index 4f309477d2e9e2c062008ebbf35419667dac5711..94e545e73ac6d1274dd9fb16bc4bb7fbcbdeb6fb 100644
--- a/chrome/browser/resources/md_history/list_container.js
+++ b/chrome/browser/resources/md_history/list_container.js
@@ -32,10 +32,6 @@ Polymer({
actionMenuModel_: Object,
},
- observers: [
- 'groupedRangeChanged_(queryState.range)',
- ],
-
listeners: {
'open-menu': 'openMenu_',
},
@@ -58,7 +54,14 @@ Polymer({
}
var list = /** @type {HistoryListBehavior} */ this.getSelectedList_();
- list.addNewResults(results, this.queryState.incremental, info.finished);
+ // It is possible for results to arrive for the grouped list before the lazy
+ // load has finished and the <history-grouped-list> element exists. In this
+ // case, add the items to a property on the unresolved element which can be
+ // read when it upgrades and is attached.
+ if (Polymer.isInstance(list))
+ list.addNewResults(results, this.queryState.incremental, info.finished);
+ else
+ list.initialData = results;
},
historyDeleted: function() {
@@ -114,19 +117,6 @@ Polymer({
},
/**
- * @param {HistoryRange} range
- * @private
- */
- groupedRangeChanged_: function(range) {
- // Reset the results on range change to prevent stale results from being
- // processed into the incoming range's UI.
- if (range != HistoryRange.ALL_TIME && this.queryResult.info) {
- this.set('queryResult.results', []);
- this.historyResult(this.queryResult.info, []);
- }
- },
-
- /**
* @param {HistoryQuery} info
* @param {!Array<HistoryEntry>} results
* @private
« no previous file with comments | « chrome/browser/resources/md_history/list_container.html ('k') | chrome/browser/resources/md_history/query_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698