зеркало из https://github.com/mozilla/gecko-dev.git
Bug 406422 - Globally decay adaptive input history to allow for new entries. r=dietrich
This commit is contained in:
Родитель
14920a42e2
Коммит
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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче