Commit Graph

163 Commits

Author SHA1 Message Date
Marco Bonardo
63caae06bd Bug 1452376 - Replace GetDescendantFolders with a recursive subquery. r=standard8
MozReview-Commit-ID: 7eXfqzX2qLl
2018-04-10 00:20:36 +02:00
Mark Banner
c674e1b442 Bug 1432435 - Remove synchronous Bookmarks::getBookmarkURI. r=mak
MozReview-Commit-ID: GSQOoSoeibq
2018-03-23 17:32:37 +00:00
Marco Bonardo
b18d35da18 Bug 1446951 - 5 - Remove QueryStringToQueryArray. r=standard8
MozReview-Commit-ID: H6nMhiXgDKA
2018-03-16 21:36:02 +01:00
Mark Banner
f190c32a0e Bug 1437516 - Remove nsINavHistoryService/nsINavBookmarksService::runInBatchMode. r=mak
MozReview-Commit-ID: D1H3xdjpMAx
2018-03-13 16:19:33 +00:00
Kit Cambridge
2581136b40 Bug 1199077 - Add Places APIs to store the bookmarks sync ID and last sync time. r=mak,tcsc
MozReview-Commit-ID: 7yEGZl5pIru
2018-03-03 11:27:58 -08:00
Kit Cambridge
1e89ded632 Bug 1199077 - Split change sources for automatic and manual bookmark restores. r=mak
MozReview-Commit-ID: 1glcCPj2X90
2018-03-01 13:37:13 -08:00
Ursula Sarracini
09e27a942f Bug 1440276 - Activity Stream spikes after Bookmark activity, triggering lots of main thread work r=mak
MozReview-Commit-ID: BoCZEDXpSKD
2018-02-28 11:17:42 -05:00
Marco Bonardo
571f75dc13 Bug 1432425 - Remove synchronous Bookmarks::RemoveFolderChildren. r=kitcambridge,standard8
MozReview-Commit-ID: GPrNcmEIgpZ
2018-02-25 21:44:41 +01:00
Marco Bonardo
d1b2359a28 Bug 1432426 - Remove synchronous Bookmarks::moveItem. r=standard8
MozReview-Commit-ID: Bg5Py6aiEDw
2018-02-24 16:10:47 +01:00
Marco Bonardo
c4f1208792 Bug 656936 - Remove Bookmarks::GetRemoveFolderTransaction. r=standard8
MozReview-Commit-ID: DLyjzC7ODyB
2018-02-23 17:27:43 +01:00
Marco Bonardo
f485280949 Bug 1432427 - Remove synchronous Bookmarks::insertSeparator. r=standard8
MozReview-Commit-ID: 2rZ1Vr1kwhi
2018-02-23 15:50:28 +01:00
Marco Bonardo
32e847a68e Bug 1433307 - Remove synchronous Bookmarks::getKeywordForBookmark. r=standard8
MozReview-Commit-ID: 1XR5N2WJ7P7
2018-02-09 17:10:26 +01:00
Marco Bonardo
cb8b543fb5 Bug 1434607 - Remove synchronous Bookmarks::setKeywordForBookmark. r=standard8
MozReview-Commit-ID: 3thDN9FIDgm
2018-02-01 11:02:41 +01:00
Marco Bonardo
a6d907b810 Bug 1313188 - Multiple bookmark keywords for same (uri, postData) pair possible. r=kitcambridge,standard8
MozReview-Commit-ID: 662vWkemAMq
2018-02-06 15:58:31 +01:00
Marco Bonardo
cdce0356dc Bug 1437040 - Remove synchronous Bookmarks::GetItemIndex. r=standard8
MozReview-Commit-ID: GpNkBI1Qe42
2018-02-09 15:23:21 +01:00
Marco Bonardo
0b62f49b75 Bug 1432434 - Remove Bookmarks::getItemDateAdded and setItemDateAdded. r=kitcambridge
MozReview-Commit-ID: XVoil1CK7c
2018-02-08 23:24:38 +01:00
Mark Banner
d4f537f98d Bug 1436966 - Remove the bookmark-observers & history-observers category listeners. r=mak
MozReview-Commit-ID: 2dsyxZG98IR
2018-02-09 11:21:14 +00:00
Marco Bonardo
cd64d76411 Bug 539517 - remove synchronous Bookmarks::SetItemIndex API. r=standard8
MozReview-Commit-ID: 20kwLPazqPC
2018-02-08 18:45:00 +01:00
Marco Bonardo
60e8a725bb Bug 1433304 - Remove synchronous Bookmarks::GetIdForItemAt. r=standard8
MozReview-Commit-ID: HZ2AiPgFawN
2018-02-08 15:40:23 +01:00
Marco Bonardo
c209f6c50e Bug 1433305 - Remove synchronous Bookmarks::GetItemLastModified. r=standard8
MozReview-Commit-ID: 5bQfv3SqaR3
2018-02-07 18:23:06 +01:00
Marco Bonardo
1d165cad60 Bug 1432437 - Remove synchronous changeBookmarkURI. r=standard8
MozReview-Commit-ID: Jy76eKCN7wp
2018-01-24 12:13:02 +01:00
Dorel Luca
e19a743ab2 Backed out changeset 8ebfca2b0c21 (bug 1432437) for Xpcshell test failure on toolkit/components/places/tests/unit/test_sync_utils.js 2018-01-26 01:43:17 +02:00
Marco Bonardo
ed36d30d49 Bug 1432439 - Remove getBookmarkIdsForURI. r=standard8
MozReview-Commit-ID: FoXR3IclKQk
2018-01-23 13:12:23 +01:00
Marco Bonardo
3cbca9cebe Bug 1432437 - Remove synchronous changeBookmarkURI. r=standard8
MozReview-Commit-ID: Jy76eKCN7wp
2018-01-24 12:13:02 +01:00
Marco Bonardo
23e81e710a Bug 1432746 - Some folders in the Library may not show their bookmark children. r=standard8
Don't use the parent node options when creating new folder nodes, since they should retain
their original options.
Additionally, we can filter nodes in the queries rather than building a lot of nodes that
will be filtered out.

MozReview-Commit-ID: MmlGDe5QgV
2018-01-24 17:55:42 +01:00
Marco Bonardo
443dfd2029 Bug 1432436 - Remove getItemType. r=standard8
MozReview-Commit-ID: 1gnQzJkYZgH
2018-01-23 16:02:03 +01:00
Marco Bonardo
e312491935 Bug 1428342 - Make Places queries directly inherit options from their parent. r=standard8
Rather then trying to guess options from the parent or the root node, make query nodes directly
inherit some options from their parent.

MozReview-Commit-ID: 1YgDjrrMqGY
2017-12-14 10:06:37 -06:00
Chris Peterson
677bf4030c Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe
2017-11-05 19:37:28 -08:00
Doug Thayer
5394d406e4 Bug 1421703 - replace onVisit with onVisits r=mak
There's a heavy enough overhead to going through XPConnect for
every observer for every visit on the nsINavHistoryObserver
interface, so this patch reduces that by replacing the single-
visit notification with one which accepts an array of visits.

Some notes: To avoid problems with the orderings of the various
ways in which we notify about visits, we have to send our bulk
onVisits notification before doing any of the others. This does
mean it technically behaves slightly different than the prior
approach of interleaving the notifications, but I can't find any
way in which this has any consequences to the end result, and it
doesn't break any tests.

MozReview-Commit-ID: GdeooH8mCkg
2017-12-20 14:27:24 -08:00
Kit Cambridge
8767b96115 Bug 1417101 - Remove the annotation observer from the bookmarks service. r=mak
Since `SetItemAnnotation` already queries `moz_bookmarks`, we can fetch
and pass the changed bookmark's info directly to
`nsNavBookmarks::NotifyItemChanged`, without going through the anno
observer.

This patch refactors the internal `Set*` methods to receive an optional
`BookmarkData` for item annotation changes, and fire `OnItemChanged`
notifications after notifying anno observers. `NotifyItemChanged` also
updates the bookmark's last modified time if requested.

MozReview-Commit-ID: Hz5qiOmAjsD
2017-11-16 16:49:03 -08:00
Noemi Erli
3f6bbbe3de Backed out changeset e0eab399db59 (bug 1417101) for Static errors in toolkit/components/places/target r=backout on a CLOSED TREE 2017-11-18 02:48:42 +02:00
Kit Cambridge
8c11514fef Bug 1417101 - Remove the annotation observer from the bookmarks service. r=mak
Since `SetItemAnnotation` already queries `moz_bookmarks`, we can fetch
and pass the changed bookmark's info directly to
`nsNavBookmarks::NotifyItemChanged`, without going through the anno
observer.

This patch refactors the internal `Set*` methods to pass an optional
`BookmarkData` from `SetItemAnnotation`, and fire `OnItemChanged`
notifications after notifying anno observers. `NotifyItemChanged` also
updates the bookmark's last modified time if requested.

MozReview-Commit-ID: Hz5qiOmAjsD
2017-11-16 16:49:03 -08:00
Mark Banner
f3d066d2c6 Bug 1405317 - When inserting trees of bookmarks, avoid updating the last modified date when marking annotations. r=mak
MozReview-Commit-ID: Ik8DKwtiXoM
2017-10-03 21:18:10 +01:00
Mark Banner
341e31f32f Bug 1371679 - Use skipDescendantsOnItemRemoval in nsNavHistoryResult to improve performance when deleting bookmark folders. r=mak
MozReview-Commit-ID: FaotgKVaEmH
2017-08-01 12:40:40 +01:00
Sebastian Hengst
2afaed5968 Backed out changeset 409b4345b85a (bug 1371679) as requested by Standard8. r=backout 2017-08-10 17:48:02 +02:00
Mark Banner
041e6b076d Bug 1388250 - Remove old sync isBookmarked and getBookmarkedURIFor APIs from nsINavBookmarksService. r=Paolo
Also remove IsBookmarkedInDatabase(), mItemCount, RecursiveFindRedirectedBookmark(), UpdateKeywordsForRemovedBookmark() from nsNavBookmarks as they aren't used anywhere.

MozReview-Commit-ID: 4cZXAdRuVoF
2017-08-08 07:58:59 +01:00
Mark Banner
ccd88e40ed Bug 1371679 - Use skipDescendantsOnItemRemoval in nsNavHistoryResult to improve performance when deleting bookmark folders. r=mak
MozReview-Commit-ID: FaotgKVaEmH
2017-08-01 12:40:40 +01:00
Marco Bonardo
c3c9c995c4 Bug 1380302 - Fix -Wmaybe-uninitialized warnings in Places. r=adw
MozReview-Commit-ID: 2HxDMhYzaib
2017-07-12 21:29:58 +02:00
Kit Cambridge
4a92ee05e5 Bug 1379412 - Don't fall back to the history visit title when fetching folder children. r=mak
MozReview-Commit-ID: 3ynWSLAPDZ3
2017-07-10 11:27:39 -07:00
Marco Bonardo
2e63b9b6bb Bug 1371677 - Delay the database connection in the history service as far as possible. r=adw
Makes initing Places services cheaper, by delaying the connection creation to the first time
it's actually needed.
Same way, delays reading the bookmark roots at the first time they are requested.
Deprecates the concept of lazy observers, since they are no more needed, we can just use addObserver.
Simplifies the startup path: always sends "places-init-complete" (both as a category and a topic) when
the connection starts and adds a "locked" database state when we can't get a working connection.
Makes PlacesCategoriesStarter register for the new category, since it's cheaper than being a bookmarks
observer.
Fixes a couple race conditions in keywords and expiration due to new startup timings.
Removes a test in test_keywords.js that is no more easily feasible, since it'd requires a pre-build
places.sqlite that should be kept up-to-date at every version.

MozReview-Commit-ID: 6ccPUZ651m0
2017-06-09 18:51:09 +02:00
Marco Bonardo
a380c4f53e Bug 1376929 - Fix places-related mochitests in chrome/ for async-transactions. r=standard8
MozReview-Commit-ID: ILrvOGzu1zo
2017-07-03 15:46:56 +02:00
Kit Cambridge
6850af47fe Bug 1360872 - Return empty strings for null bookmark titles. r=mak
MozReview-Commit-ID: Dd2sEfYvnBt
2017-06-06 14:37:22 -07:00
Nicholas Nethercote
a58025002f Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.
2017-06-22 17:08:53 +10:00
milindl
be4e0db09e Bug 653816 - returning only nontags for GetBookmarkIdsForURI and fixing consumers, r=mak
Most consumers of `GetBookmarkIdsForURI` already don't need tags, the only
consumer which does (`TaggingService`) has been changed to use a separate
database query.

MozReview-Commit-ID: LabjaA6Q0GF
2017-05-30 19:48:17 +05:30
Marco Bonardo
c536e58644 Bug 977177 - Update favicons API consumers. r=adw
Updates consumers to the new behavior.
Some consumers are changed to use  the "page-icon:" protocol, since it's not
trivial to join the icons table and get a single result out of it. In most cases
the join would return multiple results since a page can have multiple icon payloads.
These consumers for now will return the biggest payload, bug 1347532 will fix
some of them to properly pass a #size=NN fragment.
Note that, even before, these were just "moz-anno:favicon:" uris, and the
payload had to be fetched from the database.
Some other consumers for now just fallback to the largest payload, by passing 0
to GetFaviconURLForPage.

The favicon optimization still happens on the main-thread, bug 1346139 will
handle that problem.

Most of the changes involve handling the modified IconData objects, that now
retain an array of payloads, rather than just one. But note that .ico files are
not yet split into single frames, due to imagelib missing APIs that will be handled
in bug 1337402.
The other changes involve fixing queries to properly join with the new tables.

Finally, note that thanks to the FOREIGN KEYS support, removing from moz_icons or
moz_pages_w_icons will also remove relations from moz_icons_to_pages.

The system only supports square icons, so icons are resized based on their larger side.

This doesn't include new tests, those will be in a following changeset.

MozReview-Commit-ID: JUkpquhpS8y
2016-09-28 16:14:30 +02:00
Marco Bonardo
5de64a180b Bug 1344205 - Remove unsatisfied assertion on database page removals and protect removals from orphaning. r=standard8
Due to the asynchronous behavior of history, it's possible a race condition
causes a page to be used when it was about to be removed.
For example a bookmark to a page could be added between the point where we
decide the page is an orphan, and the point where we actually remove the page.
Notifications in such a case may be improperly ordered, and there is no cheap
way to guarantee we won't notify a removal in such a case.
Since applicable solutions would be too expensive (code and perf wise), for now
just remove the assertion we can't satisfy, and protect removals from possibly
creating unexpected orphans.
Testing this would require a special setup where we can guarantee thread
scheduling order, so for now this comes without a test. Regardless it's
basically only adding safety guards.

MozReview-Commit-ID: KYkaqAv8fCB
2017-03-23 17:51:52 +01:00
Gijs Kruitbosch
b381e8453b Bug 1341097 - part 3: don't dispatch oodles of titlechanged notifications for new history entries, r=mak
MozReview-Commit-ID: 7jHOcCQ5ZBb
2017-02-27 18:26:21 +00:00
Tom Tromey
e90d95a3f9 Bug 1060419 - make AppendPrintf and nsPrintfCString use Printf.h, r=froydnj
MozReview-Commit-ID: 2E8FoiNxU8L
2016-12-14 09:32:21 -07:00
Tom Tromey
48da5b7de4 Bug 1060419 - remove unneeded includes of prprf.h, r=froydnj
MozReview-Commit-ID: JifhpA3oOeH
2016-12-09 10:00:01 -10:00
Edouard Oger
0d75eb845c Bug 1228827 - Sync correctly the bookmark separators positions. r=kitcambridge
MozReview-Commit-ID: 9nvZqIt2Xgu
2017-01-26 17:41:12 -05:00