Commit Graph

592 Commits

Author SHA1 Message Date
Jim Mathies
f4bab2d516 Bug 868094 - Sync service should notify when the startOver process completes. r=rnewman 2013-05-07 15:55:51 -05:00
Nick Alexander
1e840733ac Bug 848519 - Part 3: Replace services-common/preferences.js with gre/modules/Preferences.jsm in imports. r=gavin 2013-04-15 12:45:37 -07:00
Gregory Szorc
3a3280675a Bug 836120 - Reduce memory overhead of Sync when it's not configured; r=rnewman
If Sync is (likely) not configured, the only loaded JS is for the XPCOM
service itself.

The UI code is now smart enough to initialize the Sync service if it
isn't yet loaded. This addresses bug 825728.
2013-01-30 07:05:12 -08:00
Richard Newman
812848ded0 Bug 698087 - Remove Service.updatedURL and associated consts. r=gps 2012-12-22 11:43:50 -08:00
Michal Jaskurzynski
578f9f3af9 Bug 424712 - Server location needs a slash at the end. r=rnewman 2012-11-12 09:48:26 -08:00
Kyle Huey
1482122303 Bug 798491: Add an option to stick all chrome JSMs/JS components in the same compartment. r=mrbkap,philikon
--HG--
extra : rebase_source : 98337b6a8c07d05e8c961a452dd05a7d75c3c60b
2012-10-31 09:13:28 -07:00
Vicamo Yang
8297cdabd6 Backout 67cb43bb8865: Breaks B2G Marionette 2012-10-31 16:35:11 +08:00
Kyle Huey
bdf47895bb Bug 798491: Add an option to stick all chrome JSMs/JS components in the same compartment. r=mrbkap,philikon 2012-10-30 12:28:11 -07:00
Ed Morley
777eed8444 Backout a145ded68994, e0cf397089ec & 1545e91c658e (bug 798491) for bustage on a CLOSED TREE 2012-10-30 17:02:31 +00:00
Kyle Huey
aa1997a51a Bug 798491: Add an option to stick all chrome JSMs/JS components in the same compartment. r=mrbkap,philikon 2012-10-30 08:26:12 -07:00
Gregory Szorc
28d60d3486 Bug 787273 - Part 7: Expose Status an an instance variable on Service; r=rnewman
The global Status is still there. But Service and its derived objects
avoid the singleton lookup.

There are likely a few lingering tests that reference Status when they
should reference Service.status. These will be dealt with when Status is
refactored.
2012-09-14 16:02:33 -07:00
Gregory Szorc
4242b1314b Bug 787273 - Part 6: Remove Weave export from service.js; r=rnewman
This is mostly minor cosmetic changes. Weave was being exported from
service.js for no apparent reason. It was mostly used by tests.

There was a reference to it in engines.js, which should have been caught
when the engines were associated with a service instance. engines.js now
does the right thing.

Weave is no longer exported by service.js. Tests and modules no longer
import main.js.

WeaveSvc was also renamed to Sync11Service because why not.

Weave continues to be the main public API.
2012-09-14 16:02:33 -07:00
Gregory Szorc
ed996f6433 Bug 787273 - Part 5: Remove the CollectionKeys singleton; r=rnewman
CollectionKeys is gone. Instead, we export CollectionKeyManager (the
underlying type) and an instance is available on the Service singleton.
2012-09-14 16:02:33 -07:00
Gregory Szorc
e27709479f Bug 787273 - Part 4: Refactor Identity to not be a singleton; r=rnewman
Access to IdentityManager functionality now goes through the Service
singleton.
2012-09-14 16:02:33 -07:00
Gregory Szorc
20ab44ed9b Bug 787273 - Part 3: Don't rely on Identity in SyncStorageRequest; r=rnewman
The Identity singleton is going away. This refactors SyncStorageRequest
to not use it. Behavior now works like Resource. Instances are obtained
from the Service singleton and have authentication functionality
attached.
2012-09-14 16:02:32 -07:00
Gregory Szorc
abf3a102f7 Bug 787273 - Part 2: Refactor Resource and Record to not rely on singletons; r=rnewman
Resource currently relies on the Identity singleton to perform
authentication. This is bad magic behavior. Resource instances should
authenticate according to the service instance they are associated with.

This patch removes Identity magic from Resource. Everything using
Resource now explicitly assigns an authenticator which comes from
the service instance/singleton. This required API changes to Collection
and Record.

The preferred method to obtain a Resource instance is to call
getResource() on a service instance.

The end result of this patch looks a little weird, especially in test
code. You have things like Service.resource(Service.cryptoKeysURL).
This ugliness will go away when a unified storage service client is
used.
2012-09-14 16:02:32 -07:00
Gregory Szorc
c2de204c74 Bug 787273 - Part 1: Remove Records singleton; r=rnewman
RecordManager is now an instance of the Service singleton and holds a
reference back to the service which is used to obtain needed "global"
state.
2012-09-14 16:02:32 -07:00
Gregory Szorc
7ece058f3d Bug 785225 - Part 9: Refactor engines to not use singletons; r=rnewman
Engines now maintain a reference to the service they belong to. This
allows them to obtain references to other engine instances belonging to
that service and that service only.

Stores and trackers now maintain a reference to the engine they belong
to.

Engine managers now maintain a reference back to a service.

The clients singleton has been removed. It now exists as an instance
variable on Service. Parts of ClientsEngine do behave as singletons
(e.g. commands). This will be addressed in future refactoring.
2012-08-29 14:43:41 -07:00
Gregory Szorc
3b109be643 Bug 785225 - Part 8: Don't expose SyncScheduler as a singleton; r=rnewman 2012-08-29 14:43:41 -07:00
Gregory Szorc
44c8a9c680 Bug 785225 - Part 7: Bind SendCredentialsController to a Service instance; r=rnewman 2012-08-29 14:43:40 -07:00
Gregory Szorc
aa883d0730 Bug 785225 - Part 5: Partial removal of Clients singleton; r=rnewman
Clients was being exported and used as a singleton. We still use Clients
as a singleton in some places, but only in test code. The preferred
method to access Clients is now through a service instance.
Weave.Clients is no longer exposed. Callers go through Weave.Service
now.
2012-08-29 14:43:40 -07:00
Gregory Szorc
0ee793c5f0 Bug 785225 - Part 4: Remove unused exports from Weave; change engine loading; r=rnewman
Lots of exports from the Weave global object weren't being used. This
also changes how engines are loaded. There is now a mapping in
service.js of engine name to filename. Before, it was looking at Weave.
2012-08-29 14:43:40 -07:00
Gregory Szorc
b037af07da Bug 785225 - Part 3: Don't expose ErrorHandler as a singleton; r=rnewman
Some tests still expect there to only be a single instance of
ErrorHandler for the life of the tests. And, ErrorHandler itself is
pretty tighly coupled with being a singleton because it writes out
changes to prefs, etc. But, it's a step in the right direction.
2012-08-29 14:43:40 -07:00
Gregory Szorc
76c6263b21 Bug 785225 - Part 2: Minimize Engines singleton usage; r=rnewman
Weave.Engines is no longer exported. Service now exposes an
EngineManager instance, which is the new recommended way to get at the
engine manager. Service was updated to reference the internal instance.
2012-08-29 14:43:40 -07:00
Gregory Szorc
03b466fd3b Bug 783721 - Refactor User API service interaction; r=rnewman 2012-08-29 14:43:39 -07:00
Gregory Szorc
4aef374315 Bug 781952 - Part 3: Remove unused Service._updateCluster; r=rnewman 2012-08-14 11:34:28 -07:00
Gregory Szorc
766a2d965e Bug 781952 - Part 2: Move cluster management out of service.js; r=rnewman 2012-08-14 11:34:20 -07:00
Gregory Szorc
2b7e5b1f01 Bug 781952 - Part 1: Refactor engine syncing logic out of service.js; r=rnewman 2012-08-14 11:34:14 -07:00
Gregory Szorc
226eb66194 Bug 781946 - Clean up notifications usage; r=rnewman 2012-08-13 16:51:58 -07:00
Gregory Szorc
54b5597244 Bug 781348 - Style improvements to service.js; r=rnewman 2012-08-08 16:35:37 -07:00
Gregory Szorc
ae61901042 Bug 756366 - Preserve Sync credentials during client wipe; r=rnewman 2012-05-22 10:17:53 +02:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Gregory Szorc
8ab3dda40c Bug 749957; r=rnewman 2012-05-03 14:25:33 -07:00
Gregory Szorc
10e97429b9 Bug 731494 - Refactor generic code from services/sync into services/common; r=rnewman
--HG--
rename : services/sync/modules/async.js => services/common/async.js
rename : services/sync/modules/log4moz.js => services/common/log4moz.js
rename : services/sync/modules/ext/Observers.js => services/common/observers.js
rename : services/sync/modules/ext/Preferences.js => services/common/preferences.js
rename : services/sync/modules/ext/StringBundle.js => services/common/stringbundle.js
rename : services/sync/tests/unit/test_async_chain.js => services/common/tests/unit/test_async_chain.js
rename : services/sync/tests/unit/test_async_querySpinningly.js => services/common/tests/unit/test_async_querySpinningly.js
rename : services/sync/tests/unit/test_log4moz.js => services/common/tests/unit/test_log4moz.js
rename : services/sync/tests/unit/test_Observers.js => services/common/tests/unit/test_observers.js
rename : services/sync/tests/unit/test_Preferences.js => services/common/tests/unit/test_preferences.js
rename : services/sync/tests/unit/test_restrequest.js => services/common/tests/unit/test_restrequest.js
rename : services/sync/tests/unit/test_utils_makeURI.js => services/common/tests/unit/test_utils_makeURI.js
rename : services/sync/tests/unit/test_utils_namedTimer.js => services/common/tests/unit/test_utils_namedTimer.js
rename : services/sync/tests/unit/test_utils_stackTrace.js => services/common/tests/unit/test_utils_stackTrace.js
2012-04-05 23:26:06 -07:00
Gregory Szorc
2a1bfd26ab Bug 730989 - Refactor identity and authentication in Sync; r=rnewman 2012-03-22 15:49:50 -07:00
Philipp von Weitershausen
ddadb9f464 Bug 684798 - Part 5: follow-up for wipeRemote error handling. r=rnewman 2011-10-27 22:25:01 -07:00
Richard Newman
6769b3bc54 Bug 692714 - Part 1: handle node reassignment on all storage requests. r=philikon 2011-10-27 22:25:01 -07:00
Richard Newman
d832dd472c Bug 692714 - Part 0: cleanup and logging. r=philikon (reland) 2011-10-27 22:25:01 -07:00
Richard Newman
1c9fffe824 Bug 684798 - Part 3: Catch server errors when wiping/disabling engines. r=rnewman (reland) 2011-10-27 22:25:00 -07:00
Richard Newman
4b54a00d2b Bug 684798 - Part 2: Sanitize wipeServer and catch all server maintenance errors. r=rnewman (reland) 2011-10-27 22:25:00 -07:00
Richard Newman
8f09b9ae0f Bug 684798 - Part 1: Catch server errors for crypto/keys. r=rnewman (reland) 2011-10-27 22:25:00 -07:00
Philipp von Weitershausen
974d53a1dc Merge backout on this CLOSED TREE 2011-10-20 16:21:52 -07:00
Philipp von Weitershausen
28bd994e45 Back out bug 684798 parts 1 thru 3. 2011-10-20 16:21:17 -07:00
Philipp von Weitershausen
1b3e5ac873 Back out bug 692714 and bug 684798 part 4. 2011-10-20 16:19:47 -07:00
Richard Newman
d256acd73b Bug 692714 - Part 1: handle node reassignment on all storage requests. r=philikon 2011-10-19 17:54:55 -07:00
Richard Newman
c89c39d2d8 Bug 692714 - Part 0: cleanup and logging. r=philikon 2011-10-19 17:43:54 -07:00
Philipp von Weitershausen
9888b3bd01 Merge m-c to s-c 2011-10-17 10:10:07 -07:00
Philipp von Weitershausen
c63e6756a8 Bug 684798 - Part 3: Catch server errors when wiping/disabling engines. r=rnewman 2011-10-12 13:55:19 -07:00
Philipp von Weitershausen
d107d0f5f3 Bug 684798 - Part 2: Sanitize wipeServer and catch all server maintenance errors. r=rnewman 2011-10-12 13:53:13 -07:00
Philipp von Weitershausen
866dfa2c93 Bug 684798 - Part 1: Catch server errors for crypto/keys. r=rnewman 2011-10-12 13:53:06 -07:00