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

Side by Side Diff: chrome/browser/resources/md_history/list_container.js

Issue 2377383003: MD History: Round down timestamp used for incremental queries (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/md_history/app.crisper.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/app.crisper.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698