Chromium Code Reviews| Index: chrome/browser/resources/settings/settings_main/settings_main.js |
| diff --git a/chrome/browser/resources/settings/settings_main/settings_main.js b/chrome/browser/resources/settings/settings_main/settings_main.js |
| index d090cdedbb16ce619799256543678264361d0e9d..9c90f5b576e9f0c6195ae90f3398d036dafc9b23 100644 |
| --- a/chrome/browser/resources/settings/settings_main/settings_main.js |
| +++ b/chrome/browser/resources/settings/settings_main/settings_main.js |
| @@ -86,6 +86,13 @@ Polymer({ |
| type: Object, |
| value: function() { return {}; }, |
| }, |
| + |
| + /** @private */ |
| + searchQuery: { |
|
tommycli
2016/11/01 21:05:26
Looks like settings-ui is messing with this. In th
dpapad
2016/11/01 22:02:02
Removed searchQuery property per suggestion.
|
| + type: String, |
| + value: '', |
| + observer: 'searchQueryChanged_', |
| + }, |
| }, |
| /** @override */ |
| @@ -206,6 +213,19 @@ Polymer({ |
| this.updatePagesShown_(); |
| }, |
| + /** |
| + * @param {string} current |
| + * @param {string} previous |
| + * @private |
| + */ |
| + searchQueryChanged_: function(current, previous) { |
| + // Ignore change triggered by initialization. |
| + if (previous == undefined) |
| + return; |
| + |
| + this.searchContents(this.searchQuery); |
| + }, |
| + |
| /** @private */ |
| onSubpageExpand_: function() { |
| // The subpage finished expanding fully. Hide pages other than the current |
| @@ -313,22 +333,12 @@ Polymer({ |
| }, |
| /** |
| - * Navigates to the default search page (if necessary). |
| - * @private |
| - */ |
| - ensureInDefaultSearchPage_: function() { |
| - if (settings.getCurrentRoute() != settings.Route.BASIC) |
| - settings.navigateTo(settings.Route.BASIC); |
| - }, |
| - |
| - /** |
| * @param {string} query |
| * @return {!Promise} A promise indicating that searching finished. |
| */ |
| searchContents: function(query) { |
| // Trigger rendering of the basic and advanced pages and search once ready. |
| this.inSearchMode_ = true; |
| - this.ensureInDefaultSearchPage_(); |
| this.toolbarSpinnerActive = true; |
| return new Promise(function(resolve, reject) { |