No tests existed for this functionality either, so add some.
MozReview-Commit-ID: FkHV0GBTHov
--HG--
extra : rebase_source : 3784eca629db62cc1f92a87622afe0f3da091501
Previously this was included for each sync. In addition to being less efficient,
this makes certain info that's planned to be added in the future more difficult.
MozReview-Commit-ID: fjOvAJJVI6
--HG--
extra : rebase_source : edb9a60a101c1110560c1ceb61a927248bed06e9
This makes use of the recent changes to the nsISiteSecurityService (from bug
1306471) to provide a self-updating public key preload list.
MozReview-Commit-ID: 4s3LORibAN1
--HG--
extra : rebase_source : 90a5a242177d4d8826c80e6c1f424805b62608d4
Change FirefoxAdapter definitively to require an externally-managed
Sqlite connection in order to function. This connection must be
produced by calling an openConnection() static method, which does the
work of initializing the tables and schema. Passing any other
connection is wrong, but won't be detected at runtime, and might even
work depending on the previous state of the database. Future work
might define a new KintoSqliteConnection type that can only be
produced by this method, so that it's impossible to create an
uninitialized Kinto database.
This change, since it moves Sqlite connections out of the
FirefoxAdapter, also means that the path option is no longer handled
or provided with a default. This means that the previous default,
"kinto.sqlite", is now preserved in a bunch of places all over the
codebase. This is unfortunate, but a migration is outside the scope of
this patch.
MozReview-Commit-ID: BKJqPR3jOTq
--HG--
extra : rebase_source : 91e0027890ac5fd0ba683abddc23e268f672d169
- Reflow things to try to avoid long lines.
- Add terminal comma where possible.
MozReview-Commit-ID: 1USxo0lO33w
--HG--
extra : rebase_source : 0869cc9f9ba29cc39b227a0694e9cd6d635ccc3f
This major version of kinto.js released without a FirefoxStorage
adapter. Since Gecko is the only project with a need for this adapter
as well as the only one who can use it, that file moves to this repo
as a new kinto-storage-adapter.js. This file is mostly a copy of the
most recent FirefoxStorage.js, plus some other non-exported utility
functions copied from kinto.js to make it work.
This changes the export of the kinto-offline-client.js from a
`loadKinto` function which returns the Kinto class, to the actual
Kinto class itself, with the user expected to "hook up" the
adapter. It turns out that this doesn't change much in how we actually
use Kinto, since we were always previously explicitly selecting the
Kinto adapter.
This release of kinto.js also changes some of the build options
around, which changes the minified output of kinto-offline-client.js.
There are still some outstanding stylistic complaints about
FirefoxAdapter having to do with its _init static method which is
public and the fact that sometimes FirefoxAdapter manages its own
Sqlite connection and sometimes it doesn't. These will be addressed in
a future patch.
MozReview-Commit-ID: HF0oNCEDcFs
--HG--
rename : services/common/kinto-offline-client.js => services/common/kinto-storage-adapter.js
extra : rebase_source : 11d01e573b259798305494ac072575247ac01e2c
This patch moves most of `BookmarksStore::deletePending` and
`BookmarksStore::_shouldReviveRemotelyDeletedRecord` into
`PlacesSyncUtils.bookmarks.remove` and `touch`, respectively. Both
methods use the same approach as `PlacesSyncUtils.bookmarks.dedupe` to
amend the `_modified` changeset with new change records.
We use the new `SYNC_REPARENT_REMOVED_FOLDER_CHILDREN` change source to
bump the change counters for the reparented items and their new
parents, without bumping the score and triggering extra syncs.
MozReview-Commit-ID: 1SZvygWNkgL
--HG--
extra : rebase_source : 97fdac6ccb0d0326a3da7e42259dc6a961994ac3
This patch moves the logic from `BookmarksEngine::_switchItemToDupe`
into `PlacesSyncUtils.bookmarks.dedupe`, and updates it to work with
the new tracker. `dedupe` returns an object containing new change
records, which the bookmarks engine merges into the initial changeset
from `PlacesSyncUtils.bookmarks.pullChanges`.
This patch also removes `changeItemID` and
`PlacesSyncUtils.bookmarks.changeGuid`, since `dedupe` subsumes them.
MozReview-Commit-ID: Iw3YRxWuZnK
--HG--
extra : rebase_source : 6fd80c64b160103e1090b87a300ed74b8ef85eed