| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 } | 178 } |
| 179 }, | 179 }, |
| 180 | 180 |
| 181 /** | 181 /** |
| 182 * @param {string} searchTerm | 182 * @param {string} searchTerm |
| 183 * @private | 183 * @private |
| 184 */ | 184 */ |
| 185 searchTermChanged_: function(searchTerm) { | 185 searchTermChanged_: function(searchTerm) { |
| 186 this.set('queryParams_.q', searchTerm || null); | 186 this.set('queryParams_.q', searchTerm || null); |
| 187 this.$['history'].queryHistory(false); | 187 this.$['history'].queryHistory(false); |
| 188 // TODO(tsergeant): Ignore incremental searches in this metric. |
| 189 if (this.queryState_.searchTerm) |
| 190 md_history.BrowserService.getInstance().recordAction('Search'); |
| 188 }, | 191 }, |
| 189 | 192 |
| 190 /** | 193 /** |
| 191 * @param {string} searchQuery | 194 * @param {string} searchQuery |
| 192 * @private | 195 * @private |
| 193 */ | 196 */ |
| 194 searchQueryParamChanged_: function(searchQuery) { | 197 searchQueryParamChanged_: function(searchQuery) { |
| 195 this.$.toolbar.setSearchTerm(searchQuery || ''); | 198 this.$.toolbar.setSearchTerm(searchQuery || ''); |
| 196 }, | 199 }, |
| 197 | 200 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 break; | 312 break; |
| 310 } | 313 } |
| 311 break; | 314 break; |
| 312 } | 315 } |
| 313 | 316 |
| 314 md_history.BrowserService.getInstance().recordHistogram( | 317 md_history.BrowserService.getInstance().recordHistogram( |
| 315 'History.HistoryView', histogramValue, HistoryViewHistogram.END | 318 'History.HistoryView', histogramValue, HistoryViewHistogram.END |
| 316 ); | 319 ); |
| 317 }, | 320 }, |
| 318 }); | 321 }); |
| OLD | NEW |