Граф коммитов

808 Коммитов

Автор SHA1 Сообщение Дата
Zibi Braniecki 100766fec4 Bug 1335877 - Remove resource://services-common/stringbundle.js from gecko. r=gandalf
MozReview-Commit-ID: FNoj7XH71E4

--HG--
extra : rebase_source : 294d3e425ca60e2aac6149998da7f39f62864ae5
2017-03-06 09:39:52 -08:00
Carsten "Tomcat" Book 1bc7720a43 Backed out changeset 0bd17b868a31 (bug 1335877) for causing regression bug 1344760 2017-03-06 17:03:11 +01:00
Edouard Oger 69b317e280 Bug 1321119 - Allow to Sync more tabs and reduce tabs history to 5. r=markh
MozReview-Commit-ID: 7kRg4XQeT4C

--HG--
extra : rebase_source : 7558c92cc3fefe1ade2359008df9102f5ba72322
2017-03-01 13:47:20 -05:00
Zibi Braniecki 4b7b3d4092 Bug 1335877 - Remove resource://services-common/stringbundle.js. r=rnewman
MozReview-Commit-ID: M7V6JS5myy

--HG--
extra : rebase_source : a47d739d3dd67ce563088aaf9fab5421de376cd7
2017-03-02 15:26:53 -08:00
Kit Cambridge 46e87ef366 Bug 1317223 (part 4) - formalize weak tracking in `BookmarksChangeset`. r=markh
MozReview-Commit-ID: C6otrtSuhZH
2017-02-06 10:19:27 -08:00
Mark Hammond fdeace22db Bug 1317223 (part 1) - a collection_repair module (without any repairers) and integration with the clients engine. r=rnewman
This creates a collection_repair module, somewhat analogous to the existing
collection_validator module. This defines the public interface to request a
new repair and respond to a remote repair request, and also includes changes
to clients.js to call this public interface.

MozReview-Commit-ID: 9JPpRrLgFoR
2017-03-02 16:14:51 +11:00
Mark Hammond 79d7981ee8 Bug 1342851 - record the last-modified time of a Sync client record. r=rnewman
MozReview-Commit-ID: 2jtCsl3sy3X

--HG--
extra : rebase_source : f0d24ca1a990abd8499f7f07eb7561840441dd1a
2017-02-27 12:44:12 +11:00
Thom Chiovoloni c396116b69 Bug 1337993 - Ensure we mark all current bookmarks for reupload when bookmark engine enabled state changes. r=kitcambridge
MozReview-Commit-ID: 4gOmqrzUr77

--HG--
extra : rebase_source : ee645449c2bb08cc13a6b9040a0bbdd506d5c0a3
2017-02-13 14:28:06 -05:00
Mark Hammond cd73a70071 Bug 1340357 - remove all special eslint rules in services/. r=eoger
MozReview-Commit-ID: 6zMOBoWLOhJ

--HG--
extra : rebase_source : cf546abd9a52230746c0c05f7bb716cae42815bf
2017-02-17 12:34:45 +11:00
Ethan Glasser-Camp b228d5b47d Bug 1321570 - use dependency injection for fxAccounts, r=kmag
Get rid of the ugly hack where test code monkeypatches a singleton to
convince the rest of the ExtensionStorageSync code that a fake user is
logged in. Instead, take a handle to the fxAccounts service at
construction time. Test code can provide any kind of fxAccounts it
wants, including one that has a hard-coded user.

This provokes a bunch of changes:

- ExtensionStorageSync is now no longer a singleton, but a class. You
  have to instantiate it in order to do anything with it. A global
  instance extensionStorageSync is provided for use by Sync code as
  well as WebExtension code.

- CryptoCollection is now also a class, and each ExtensionStorageSync
  instance has its own CryptoCollection. This dependency should maybe
  also be injected, but for the time being it doesn't provide us any
  value to do so.

- Converting singletons with asynchronous methods to classes is a pain
  in the neck. We convert async method foo from `foo:
  Task.async(....)` to `async foo() { .... }`. While we're here,
  convert KeyRingEncryptionRemoteTransformer#decode to async/await to
  eliminate a need for `let self = this`.

- Update Sync code and WebExtension code to use extensionStorageSync.

- There's a cyclic dependency where CryptoCollection#sync depends on
  ExtensionStorageSync#_syncCollection which depends on
  CryptoCollection#getKeyRing. As a short-term hack, we now require an
  ExtensionStorageSync argument to CryptoCollection#sync.

- KeyRingEncryptionRemoteTransformer now takes a handle to fxAccounts
  on construction time as well. Because this is the only
  EncryptionRemoteTransformer subclass that accesses fxAccounts, we
  can get rid of the hack where the tests monkeypatch something in the
  EncryptionRemoteTransformer prototype.

- CollectionKeyEncryptionRemoteTransformer now takes a handle to a
  CryptoCollection, rather than relying on a global one.

- A bunch of methods that previously assumed access to fxAccounts now
  check if fxAccounts is present (i.e. if we're on Android). Strictly
  speaking, this isn't required by this change, but it helps make
  certain kinds of failure a little easier to diagnose.

- Update tests, including extracting a domain-specific helper method
  to hide the use of CollectionKeyEncryptionRemoteTransformer. We now
  no longer monkeypatch in our mock fxaService, but pass it to the
  test so that it can do whatever it wants with it. We also provide an
  ExtensionStorageSync instance for convenience. Access to the global
  cryptoCollection is now done through an ExtensionStorageSync
  instance.

To summarize, we've gone from a situation where a bunch of singletons
had implicit dependencies on other singletons in a shared global
namespace, to a situation where dependencies are provided explicitly
using method/constructor arguments. This highlights some of the
dependencies present:

- ExtensionStorageSync depends on CryptoCollection and fxAccounts if
  it needs to sync

- Every collection created via openCollection needs a handle to
  CryptoCollection so it can correctly create its remote transformers

- CryptoCollection needs a handle to fxAccounts so it can create its
  own remote transformer for its special collection

Most of this is only possible, or at least much easier, because we no
longer try to juggle Sqlite connections but just keep one around
forever.

However, please note:

- CryptoCollection needs a handle to ExtensionStorageSync to actually
  perform syncing logic because that's where we foolishly put the
  logic to make requests

- There's still a backing Sqlite store which is shared by everything

- There's still a singleton tracking contexts that opened extensions
  which we manage to try to clean contexts up correctly

MozReview-Commit-ID: DGIzyRTdYZ1

--HG--
extra : rebase_source : 305a98b8e1ece3ae7a5e8a2fdb5c58d8e7c496d9
2017-01-10 16:44:01 -05:00
Ethan Glasser-Camp 4f7afb05a6 Bug 1321570 - Move ExtensionStorageSync crypto out of services/sync, r=kmag
Since services/sync doesn't ship on Android, this meant
conditionally-defining some variables such as `cryptoCollection` and
`CollectionKeyEncryptionRemoteTransformer` depending on whether or not
we were on Android. However, none of these definitions really rely on
functionality that isn't present on Android (although you can't really
use them yet either). Move the dependency together with the dependant
code so we can simplify a bit. This lets us remove conditional uses of
`cryptoCollection` and `CollectionKeyEncryptionRemoteTransformer`.

Because the WebExtensions source directory has more stringent eslint
rules, we end up reformatting and commenting a bit in addition to
moving.

MozReview-Commit-ID: 2ddDeymYFNi

--HG--
rename : services/sync/tests/unit/test_extension_storage_crypto.js => toolkit/components/extensions/test/xpcshell/test_ext_storage_sync_crypto.js
extra : rebase_source : f84c0810b6a447f2104f96c9dc9d6139743f269c
2017-02-13 15:06:02 -05:00
Mark Hammond e23f30ffed Bug 1338439 - Sync event telemetry should use the same flowID when sending a command to multiple clients, and should include a reason for some commands. r=tcsc
MozReview-Commit-ID: 7a6qjRUswGL

--HG--
extra : rebase_source : a6112f4fb8762f3cde4a85aaa5ef4a8d11b15947
2017-02-10 16:49:33 +11:00
Ethan Glasser-Camp 3a3e213b7d Bug 1333810: Hash record IDs during encryption, r=kmag,rnewman
This does a sha256 of record IDs, the same way we do for collection
IDs, during encryption.

The way we compute the new ID (using an overridden method) is a little
bit of a hack, but we use the new ID as part of the HMAC. This also
invalidates a previous assumption, which is that we kept record IDs
the same during decryption.

MozReview-Commit-ID: Gbzlo9OE1he

--HG--
extra : rebase_source : 3a303cce50e60ecf0cd709da4ebef5ff98bff314
extra : intermediate-source : 033163eeac84466553d4f9636093c3b824d7cf2b
extra : source : c5c115baff4a729b064e74e87821f7ee3b9d3edb
2017-01-31 13:09:38 -05:00
Ethan Glasser-Camp e9fb891837 Bug 1333810: Encrypt record deletes, r=kmag,rnewman
Camouflage deletes as updates, according to the rules given by the new
RemoteTransformer contract.

MozReview-Commit-ID: CwVJSs2jOil

--HG--
extra : rebase_source : 88f8e1b4db0b6b7aea4ae5dcfc67af906cb01009
2017-01-27 19:27:10 -05:00
Edouard Oger 5aba6580c8 Bug 1332556 - Set correct passwords' timestamps on first Sync. r=markh
MozReview-Commit-ID: Izg9sIeGNJo

--HG--
extra : rebase_source : 079f73e0e09bf9969989bb72d82736291dbe83dc
2017-02-07 12:56:56 -05:00
Ahsan 39fbeac36e Bug 1336282 - Moved bookmark frecency query into `PlacesSyncUtils`. r=kitcambridge
MozReview-Commit-ID: 4DDXOUQ2C8N

--HG--
extra : rebase_source : b4d1785e126b87672fc064dee329a791977b1372
2017-02-09 12:28:26 -08:00
Mark Hammond f02fca824e Bug 1310065 - use more reliable preferences for calculating the client count in the sync scheduler. r=eoger
This patch switches to using preferences written by the clients engine to
determine the number of clients so it's correct before the first sync for
a browser session.

It also fixes another bug I discovered - if a mobile device dropped from the
client list, the preference for the number of mobile devices would remain at
1 rather than resetting to zero.

MozReview-Commit-ID: IPythSQcorx

--HG--
extra : rebase_source : 4ce465e3958d037f90312553a0c353cdc161c0fe
2017-01-25 18:11:05 +11:00
Edouard Oger f7e895d911 Bug 1329850 - Sync records creation failures are reported to telemetry. r=markh
MozReview-Commit-ID: AEOlmkmyIvY

--HG--
extra : rebase_source : 71c2a627bd0291fa2b9448710e6b0eb1fae36719
2017-01-24 17:05:12 -05:00
Sebastian Hengst 573326d526 Backed out changeset 20863de3b8f4 (bug 1329850) for eslint failure: redeclaration of collection in deeper scope in test_syncengine_sync.js. r=backout 2017-01-31 18:46:39 +01:00
Edouard Oger ecdeb55693 Bug 1329850 - Sync records creation failures are reported to telemetry. r=markh
MozReview-Commit-ID: AEOlmkmyIvY

--HG--
extra : rebase_source : bce1d12bf1fdb7867ac0f290fdfe4e6b5d761bcc
2017-01-24 17:05:12 -05:00
Edouard Oger 8561ffa3a2 Bug 1319433 - Bump tabs engine TTL to 21 days. r=markh
MozReview-Commit-ID: GdEZkQEdZMD

--HG--
extra : rebase_source : 949e172445996b71271788d11cf136bef95254f8
2017-01-23 11:05:41 -05:00
Thom Chiovoloni c197835bcf Bug 1295237 - Add 'Mobile Bookmarks' root to the bookmark menus if we have it. r=markh
MozReview-Commit-ID: 3ybnskOID1O

--HG--
extra : rebase_source : 3faec9e53939626dc89c039706aaa2f003571d18
2017-01-17 13:15:49 -05:00
Jared Wein 285bebb13e Bug 1330791 - Enable the brace-style rule for eslint in /services and fix the associated errors. r=markh
MozReview-Commit-ID: Ebl3bODX14z

--HG--
extra : rebase_source : 20fe1d8043b04c53b9521bc0ad30b72ebf253062
2017-01-12 18:24:52 -05:00
Jared Wein 7cb8b041fe Bug 1330791 - Enable the no-unused-vars rule for eslint in /services and fix associated errors. r=markh
MozReview-Commit-ID: DFcvEllwGSb

--HG--
extra : rebase_source : c6abc288124c1c47480cc73db8294195d8832fa2
2017-01-12 18:02:08 -05:00
Wes Kocher 20dc006d88 Backed out 14 changesets (bug 1330791) for various android failures a=backout
Backed out changeset eada8de7256f (bug 1330791)
Backed out changeset a3c656a9f3ca (bug 1330791)
Backed out changeset e0cbc754e841 (bug 1330791)
Backed out changeset 49d8016fab12 (bug 1330791)
Backed out changeset 53d4b83ccd22 (bug 1330791)
Backed out changeset b35cbfcd801f (bug 1330791)
Backed out changeset 25a6356de622 (bug 1330791)
Backed out changeset 46f9c247550d (bug 1330791)
Backed out changeset ef7356099bd3 (bug 1330791)
Backed out changeset a5fe483288db (bug 1330791)
Backed out changeset 4902107b7568 (bug 1330791)
Backed out changeset 5b2b2be2e389 (bug 1330791)
Backed out changeset 610ec89e98bb (bug 1330791)
Backed out changeset 631adda26a21 (bug 1330791)

MozReview-Commit-ID: GGUFW29U3TL
2017-01-17 17:06:36 -08:00
Jared Wein 3ebade8189 Bug 1330791 - Enable the brace-style rule for eslint in /services and fix the associated errors. r=markh
MozReview-Commit-ID: Ebl3bODX14z

--HG--
extra : rebase_source : f708038a1e3d27f7397d2ff6ac8981d1e5fa5d43
2017-01-12 18:24:52 -05:00
Jared Wein 42349d27b4 Bug 1330791 - Enable the no-unused-vars rule for eslint in /services and fix associated errors. r=markh
MozReview-Commit-ID: DFcvEllwGSb

--HG--
extra : rebase_source : 24dc56342d6b1a95df64c0c7c5a1819344cfe603
2017-01-12 18:02:08 -05:00
Jared Wein 43bac26d30 Bug 1331661 - Enable the 'quotes' rule for eslint and fix most of the errors with --fix. r=Gijs
MozReview-Commit-ID: 6tv0Z06CO4a

--HG--
extra : rebase_source : 014c0b04d8538dc5f15bc6dd4ed6bd220c55c5d4
2017-01-17 09:48:17 -06:00
Florian Quèze 85611a7b6d Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws.
--HG--
extra : rebase_source : a22344ee1569f58f1f0a01017bfe0d46a6a14602
2017-01-17 11:50:25 +01:00
Jared Wein 65605f286e Bug 1330014 - Add .eslintrc.js file to /services and run eslint --fix to automatically fix most of the errors. --fix brings the error count down from 4083 to 321 errors. r=markh,standard8
MozReview-Commit-ID: EjyAssqiQk8

--HG--
extra : rebase_source : cbfc8d4474b6c3d46eb21374e33fd3341403444f
2017-01-10 12:09:02 -05:00
Iris Hsiao 55313b4bc9 Backed out changeset 7e0a0bd74199 (bug 1330014) 2017-01-13 11:06:43 +08:00
Jared Wein 81cb5e57b9 Bug 1330014 - Add .eslintrc.js file to /services and run eslint --fix to automatically fix most of the errors. --fix brings the error count down from 4083 to 321 errors. r=markh,standard8
MozReview-Commit-ID: EjyAssqiQk8

--HG--
extra : rebase_source : d783829bc7fced3044d0d076c4786a6957d29bb6
2017-01-10 12:09:02 -05:00
Ethan Glasser-Camp 90c9daf114 Bug 1320324: deleted values are not handled correctly on sync, r=markh
No tests existed for this functionality either, so add some.

MozReview-Commit-ID: FkHV0GBTHov

--HG--
extra : rebase_source : 3784eca629db62cc1f92a87622afe0f3da091501
2016-12-22 13:37:12 -05:00
Carsten "Tomcat" Book 482d5a887d Backed out changeset 9ae4e620a16d (bug 1320324) for eslint failure
--HG--
extra : rebase_source : f714eefc88ce6918a6d66b17a6c75c462e4f2fff
2017-01-11 16:59:24 +01:00
Ethan Glasser-Camp f82a8172a8 Bug 1320324: deleted values are not handled correctly on sync, r=markh
No tests existed for this functionality either, so add some.

MozReview-Commit-ID: FkHV0GBTHov

--HG--
extra : rebase_source : 34e6751ecf2b85c1898f710c7706295d088285a3
2016-12-22 13:37:12 -05:00
Mark Hammond 5f7905c8f3 Bug 1289536 (part 2) - Add a unique flowID GUID to each command sent via the clients collection. r=rnewman
MozReview-Commit-ID: 4eTFDq4Yr7S

--HG--
extra : rebase_source : faa5cb3ddd41e107b898412b0c9c5899df91c335
2016-11-04 12:46:57 +11:00
Kit Cambridge 4797a3b6cd Bug 1319175 - Switch to `JSONFile` for tracker persistence. r=markh
MozReview-Commit-ID: 6nhGe9aHSk3

--HG--
extra : rebase_source : 43449f689a47287e034b80d3cbdd2fd5fbba44ab
2016-12-20 12:25:27 -07:00
Kris Maglione 22eba76d86 Bug 987512: Part 5 - Remove manual AddonManager promise wrappers. r=rhelmer
MozReview-Commit-ID: LrEiGbQGrt6

--HG--
extra : rebase_source : 38971f7242261e5d8b11d586f6eb033b6364c6cf
extra : histedit_source : 0b9403a97d3f3092b8991e8e6af5095b898dd8c3
2016-12-15 12:03:24 -10:00
Thom Chiovoloni 39c3163cf7 Bug 1321396 - Skip oversized records without aborting the sync by default in sync engines. r=markh
MozReview-Commit-ID: 7hgzyKb2UxY

--HG--
extra : rebase_source : 7c7f238a8e46b0776afe83798061d1539b07f76c
2016-11-30 17:28:52 -05:00
Kit Cambridge 73fba410f4 Bug 1173359 - Exclude hidden pages and framed links from syncing. r=markh
MozReview-Commit-ID: 8I4Sulyr0H7

--HG--
extra : rebase_source : 55fb1ff567c0a2916bc0153a09c41b03d396cfeb
2016-11-22 12:52:09 -07:00
Kit Cambridge 8c2abe0611 Bug 1318414 - Default to empty strings for titles and parent titles if not set. r=rnewman,tcsc
MozReview-Commit-ID: DppxJuVrbAM

--HG--
extra : rebase_source : a214d54fda7d25798039fc9844c34cabd3165a27
2016-11-19 08:29:26 -08:00
Kit Cambridge ccee4d37f5 Bug 1258127 - Add migration logic for old synced bookmarks. r=markh,rnewman
MozReview-Commit-ID: Gye30bYZejy

--HG--
extra : rebase_source : 882c4769d28ad4b56829e5b6037f74c04028f03a
2016-11-18 14:00:56 -08:00
Kit Cambridge 4c26a7b758 Bug 1258127 - Move bookmark deletion logic into `PlacesSyncUtils.bookmarks.remove`. r=tcsc
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
2016-11-17 15:07:14 -08:00
Kit Cambridge 69350f8b7b Bug 1258127 - Move bookmark de-duping logic into `PlacesSyncUtils.bookmarks.dedupe`. r=markh
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
2016-11-17 15:04:19 -08:00
Kit Cambridge ccf45973d0 Bug 1258127 - Update the bookmarks engine to pull changes from Places. r=markh
MozReview-Commit-ID: 4YESuxP2rRf

--HG--
extra : rebase_source : 9c2f5830d10ba280e45c30076f19f498e6913fd0
2016-11-17 15:39:15 -08:00
Sebastian Hengst 0849ed2bea Backed out changeset c644b01be649 (bug 1318414) for failing xpcshell test test_bookmark_store.js. r=backout 2016-11-19 09:35:02 +01:00
Kit Cambridge 96702bd1f2 Bug 1318414 - Default to empty strings for titles and parent titles if not set. r=rnewman,tcsc
MozReview-Commit-ID: DppxJuVrbAM

--HG--
extra : rebase_source : 649bc0b945c8a2dd69dade682bf80c874053bc92
2016-11-17 10:42:32 -08:00
Mark Hammond 136eb80ff1 Bug 1303831 - have _buildGUIDMap yield to the event loop and have it abort on shutdown. r=rnewman,tcsc
MozReview-Commit-ID: Ff8mq9eHBsQ

--HG--
extra : rebase_source : ab891da610a03791d6c13ea35fc5cd44d305a175
2016-11-15 17:01:22 +11:00
Kit Cambridge 6cd5db91d6 Bug 1303679 - Remove Places roots, reading list items, and pinned sites from the Sync server. r=markh
MozReview-Commit-ID: AhOBOnXsTYi

--HG--
extra : rebase_source : 1f39b406b1a9215ca04ff4602cc8fac54163916f
2016-11-09 14:23:54 -08:00
Ethan Glasser-Camp ba082acec6 Bug 1253740 - Handle password resets more correctly, r=markh
MozReview-Commit-ID: 1mSvbsYP9fV

--HG--
extra : rebase_source : 24676ce50564a291ce4fdcce40633f76e381bb46
extra : intermediate-source : 385eb385501deec773b4680e64e8014bddaf0edb
extra : source : 8595b3a68fbd2dccbe63324524fd9532ea62bca5
2016-09-30 12:12:58 -04:00