mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 565411 - Accept max_results as a parameter to allow configuring the number of history items. [r=mconnor]
This commit is contained in:
parent
8ca541a1a3
commit
2de3b0d76b
@ -142,7 +142,7 @@ HistoryStore.prototype = {
|
||||
"FROM moz_places " +
|
||||
"WHERE last_visit_date > :cutoff_date " +
|
||||
"ORDER BY frecency DESC " +
|
||||
"LIMIT 5000");
|
||||
"LIMIT :max_results");
|
||||
this.__defineGetter__("_allUrlStm", function() stm);
|
||||
return stm;
|
||||
},
|
||||
@ -202,6 +202,8 @@ HistoryStore.prototype = {
|
||||
getAllIDs: function HistStore_getAllIDs() {
|
||||
// Only get places visited within the last 30 days (30*24*60*60*1000ms)
|
||||
this._allUrlStm.params.cutoff_date = (Date.now() - 2592000000) * 1000;
|
||||
this._allUrlStm.params.max_results = 5000;
|
||||
|
||||
let [exec, execCb] = Sync.withCb(this._allUrlStm.executeAsync, this._allUrlStm);
|
||||
return exec({
|
||||
ids: {},
|
||||
|
Loading…
Reference in New Issue
Block a user