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

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

Issue 2643533003: MD History: Use one-way binding for history query state. (Closed)
Patch Set: Remove wrapper function 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/router.js
diff --git a/chrome/browser/resources/md_history/router.js b/chrome/browser/resources/md_history/router.js
index 36eacaa8a844154b95cbd53143fa9a13ae66a692..986d5fb1b7b49b9a48105e0c8a2084c02f5dfd16 100644
--- a/chrome/browser/resources/md_history/router.js
+++ b/chrome/browser/resources/md_history/router.js
@@ -12,37 +12,14 @@ Polymer({
notify: true,
},
- /** @type {QueryState} */
- queryState: {
- type: Object,
- notify: true,
- value: function() {
- // TODO(tsergeant: Move this initialization into query-manager.
- return {
- // Whether the most recent query was incremental.
- incremental: false,
- // A query is initiated by page load.
- querying: true,
- queryingDisabled: false,
- _range: HistoryRange.ALL_TIME,
- searchTerm: '',
- groupedOffset: 0,
-
- set range(val) {
- this._range = Number(val);
- },
- get range() {
- return this._range;
- },
- };
- },
- },
-
path_: {
type: String,
observer: 'pathChanged_',
},
+ /** @type {QueryState} */
+ queryState: Object,
+
queryParams_: Object,
},
@@ -74,7 +51,7 @@ Polymer({
/** @private */
queryParamsChanged_: function() {
- this.set('queryState.searchTerm', this.queryParams_.q || '');
+ this.fire('change-query', {search: this.queryParams_.q || ''});
},
/** @private */
« no previous file with comments | « chrome/browser/resources/md_history/query_manager.js ('k') | chrome/test/data/webui/md_history/history_grouped_list_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698