| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 Polymer({ | 5 Polymer({ |
| 6 is: 'history-app', | 6 is: 'history-app', |
| 7 | 7 |
| 8 properties: { | 8 properties: { |
| 9 showSidebarFooter: Boolean, | 9 showSidebarFooter: Boolean, |
| 10 | 10 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 } | 194 } |
| 195 }, | 195 }, |
| 196 | 196 |
| 197 /** | 197 /** |
| 198 * @param {string} searchTerm | 198 * @param {string} searchTerm |
| 199 * @private | 199 * @private |
| 200 */ | 200 */ |
| 201 searchTermChanged_: function(searchTerm) { | 201 searchTermChanged_: function(searchTerm) { |
| 202 this.set('queryParams_.q', searchTerm || null); | 202 this.set('queryParams_.q', searchTerm || null); |
| 203 this.$['history'].queryHistory(false); | 203 this.$['history'].queryHistory(false); |
| 204 // TODO(tsergeant): Ignore incremental searches in this metric. |
| 205 if (this.queryState_.searchTerm) |
| 206 md_history.BrowserService.getInstance().recordAction('Search'); |
| 204 }, | 207 }, |
| 205 | 208 |
| 206 /** | 209 /** |
| 207 * @param {string} searchQuery | 210 * @param {string} searchQuery |
| 208 * @private | 211 * @private |
| 209 */ | 212 */ |
| 210 searchQueryParamChanged_: function(searchQuery) { | 213 searchQueryParamChanged_: function(searchQuery) { |
| 211 this.$.toolbar.setSearchTerm(searchQuery || ''); | 214 this.$.toolbar.setSearchTerm(searchQuery || ''); |
| 212 }, | 215 }, |
| 213 | 216 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 break; | 335 break; |
| 333 } | 336 } |
| 334 break; | 337 break; |
| 335 } | 338 } |
| 336 | 339 |
| 337 md_history.BrowserService.getInstance().recordHistogram( | 340 md_history.BrowserService.getInstance().recordHistogram( |
| 338 'History.HistoryView', histogramValue, HistoryViewHistogram.END | 341 'History.HistoryView', histogramValue, HistoryViewHistogram.END |
| 339 ); | 342 ); |
| 340 }, | 343 }, |
| 341 }); | 344 }); |
| OLD | NEW |