mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 406422 - Globally decay adaptive input history to allow for new entries. r=dietrich
This commit is contained in:
parent
14920a42e2
commit
5cb6496071
@ -976,7 +976,7 @@ nsNavHistoryExpire::ExpireAnnotationsParanoid(mozIStorageConnection* aConnection
|
||||
|
||||
// nsNavHistoryExpire::ExpireInputHistoryParanoid
|
||||
//
|
||||
// Deletes dangling input history
|
||||
// Deletes dangling input history, decay potentially unused entries
|
||||
|
||||
nsresult
|
||||
nsNavHistoryExpire::ExpireInputHistoryParanoid(mozIStorageConnection* aConnection)
|
||||
@ -989,6 +989,13 @@ nsNavHistoryExpire::ExpireInputHistoryParanoid(mozIStorageConnection* aConnectio
|
||||
"WHERE h.id IS NULL)"));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Decay potentially unused entries (e.g. those that are at 1) to allow
|
||||
// better chances for new entries that will start at 1
|
||||
rv = aConnection->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
|
||||
"UPDATE moz_inputhistory "
|
||||
"SET use_count = use_count * .9"));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user