For public entry points of nsNavHistory, add ENSURE_ARG for in-pointers and ENSURE_ARG_POINTER for out-pointers; NS_ASSERTION for private APIs. Test automatically finds functions from nav history service and calls them with null arguments.
Separate the last half of UpdateFrecency into UpdateFrecencyInternal to be reused by FixInvalidFrecencies. Existing tests touch both paths, e.g., test_000_frecency and test_migrateFrecency.
Don't bother GROUP_CONCATing tag titles that are empty. Restructure the BOOK_TAG_SQL #define to be somewhat more readable. Test by adding tags to a uri then renaming the tag to empty and making sure they don't show up in autocmoplete results.
Bug 476300 - Calculate all page frecencies when upgrading/migrating
Bug 482351 - 1 sort operation required by mDBInvalidFrecencies
Create a new method FixInvalidFrecencies that finds invalid (negative) frecencies and recalculates them. Use it for handling creating/migrating DBs as well as recalculating invalid places on daily idle (place frecencies are already estimated by decay). This obviates a few preferences, queries and methods related to recalculating on idle. The test uses mork history with a number of pages that now all get their frecencies calculated on migrate, where before this fix, the test fails with a bunch of pages still with negative frecencies.
This makes the history code expire when we flush the temporary table data to
disk instead of every single time we add a visit. This is also now done on a
background thread as opposed to the main thread, in a transaction with other
work. In theory, this reduces fsyncs (but in practice, no change was noticed).
Regardless, this removes fsyncs from the main thread, which is always a good
thing to do.
r=dietrich
r=mak
This fixes a crash when we initialize nsNavBookmarks with a database that is out
of date (the schema version is less than the current one). Because the bookmark
service initializes the history service in its Init method, and the history
service tries to get the bookmark service if the database needs an upgrade, we
try to re-enter the bookmark service's constructor. Bad things happen.
Adds a test to ensure that we don't do this again.
r=dietrich
r=MaK77
This adds a new function to nsNavBookmarks that determines if a place id is a
"real" bookmark (not a livemark child). It also makes a number of places use
this new function to unify and simplify a number of code paths.
Additionally, it changes how frecency is calculated for bookmarked items. If a
visit is bookmarked (aIsBookmarked is true in CalculateFrecencyInternal), the
visited bookmark bonus is now added for all visits. The visit bonus was also
cut in half for bookmarks so TRANSITION_BOOKMARK will still end up with the same
value (150).
r=dietrich
r=MaK77
Bug 472943 - Two confusable preferences, "browser.urlbar.search.sources" and "browser.urlbar.default.behavior", should be unified
--HG--
rename : toolkit/components/places/tests/autocomplete/test_search_sources.js => toolkit/components/places/tests/autocomplete/test_enabled.js