| 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-list-container', | 6 is: 'history-list-container', |
| 7 | 7 |
| 8 properties: { | 8 properties: { |
| 9 // The path of the currently selected page. | 9 // The path of the currently selected page. |
| 10 selectedPage_: String, | 10 selectedPage_: String, |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 var dialog = this.$.dialog.getIfExists(); | 72 var dialog = this.$.dialog.getIfExists(); |
| 73 if (!incremental && dialog && dialog.open) | 73 if (!incremental && dialog && dialog.open) |
| 74 dialog.close(); | 74 dialog.close(); |
| 75 | 75 |
| 76 this.set('queryState.querying', true); | 76 this.set('queryState.querying', true); |
| 77 this.set('queryState.incremental', incremental); | 77 this.set('queryState.incremental', incremental); |
| 78 | 78 |
| 79 var lastVisitTime = 0; | 79 var lastVisitTime = 0; |
| 80 if (incremental) { | 80 if (incremental) { |
| 81 var lastVisit = this.queryResult.results.slice(-1)[0]; | 81 var lastVisit = this.queryResult.results.slice(-1)[0]; |
| 82 lastVisitTime = lastVisit ? lastVisit.time : 0; | 82 lastVisitTime = lastVisit ? Math.floor(lastVisit.time) : 0; |
| 83 } | 83 } |
| 84 | 84 |
| 85 var maxResults = | 85 var maxResults = |
| 86 this.groupedRange == HistoryRange.ALL_TIME ? RESULTS_PER_PAGE : 0; | 86 this.groupedRange == HistoryRange.ALL_TIME ? RESULTS_PER_PAGE : 0; |
| 87 chrome.send('queryHistory', [ | 87 chrome.send('queryHistory', [ |
| 88 queryState.searchTerm, queryState.groupedOffset, queryState.range, | 88 queryState.searchTerm, queryState.groupedOffset, queryState.range, |
| 89 lastVisitTime, maxResults | 89 lastVisitTime, maxResults |
| 90 ]); | 90 ]); |
| 91 }, | 91 }, |
| 92 | 92 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 }.bind(this)); | 262 }.bind(this)); |
| 263 menu.closeMenu(); | 263 menu.closeMenu(); |
| 264 }, | 264 }, |
| 265 | 265 |
| 266 /** | 266 /** |
| 267 * @return {HTMLElement} | 267 * @return {HTMLElement} |
| 268 * @private | 268 * @private |
| 269 */ | 269 */ |
| 270 getSelectedList_: function() { return this.$.content.selectedItem; }, | 270 getSelectedList_: function() { return this.$.content.selectedItem; }, |
| 271 }); | 271 }); |
| OLD | NEW |