Dan Mills
44c908db91
save username/pass in verifyLogin, at least for now
2008-06-30 23:41:47 -07:00
Atul Varma
994e224c7d
Automated merge with http://hg.mozilla.org/labs/weave
2008-06-30 23:36:06 -07:00
Atul Varma
e04369a218
Modified sharing.js to obey the new sharing api.
2008-06-30 23:36:00 -07:00
Dan Mills
802f7a254d
fix cookie command logging; skip cookie commands for items we don't have
2008-06-30 23:26:35 -07:00
Dan Mills
e9d12f341f
continue if there is an edit command for an item we don't have (just print a warning)
2008-06-30 23:25:51 -07:00
Dan Mills
4c4dfecbc8
fix a missing yield, split up a couple of lines for clarity
2008-06-30 23:25:15 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
5d960d2e8f
Combined shareData and stopSharingData into one function to reuse code; made it so that if it gets called when Weave.DAV is already locked, instead of failing it sets up an observer that will trigger the share to happen as soon as the sync-succeeded or sync-failed message is received.
2008-06-30 22:30:04 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
dae06b83f1
Added test_bookmark_sharing to version control; note this doesn't pass right now (and in fact the main test is commented out.)
2008-06-30 18:50:06 -07:00
Atul Varma
07f3aacf01
Added documentation for Service._getKeypair().
2008-06-30 18:09:30 -07:00
Atul Varma
aa2cab9380
The auto-login at startup no longer unconditionally syncs; if the login fails, the sync is now aborted.
2008-06-30 17:55:48 -07:00
Atul Varma
d7ff36daab
Fixed a bug from r5a5113a0a405 that caused some syncing unit tests to fail.
2008-06-30 16:55:38 -07:00
Atul Varma
7512505bb7
Added a Service.verifyPassphrase() method. Also, Service.login() now checks to ensure that the user's passphrase is valid, and if it's not, it throws an exception.
2008-06-30 16:50:19 -07:00
Atul Varma
bd11079518
Automated merge with http://hg.mozilla.org/labs/weave
2008-06-30 15:54:21 -07:00
Atul Varma
4c44bcd581
Fixed a potential bug in Service.login() whereby a user's directory wouldn't be created if it didn't exist (though it would in Service.verifyLogin(), which is only called from the setup wizard).
2008-06-30 15:54:15 -07:00
Myk Melez
ac691d002a
Automated merge with ssh://hg.mozilla.org/labs/weave/
2008-06-30 15:16:31 -07:00
Myk Melez
3f7efe892f
bug 442711: validate virtual tabs to make sure they have the minimal information necessary to recreate them before trying to save them or notify the user about them
2008-06-30 15:13:07 -07:00
Atul Varma
3e6bb56f61
Moved isPassphraseValid() out of its test suite and into the crypto module.
2008-06-30 14:40:11 -07:00
Dan Mills
c66f11ca21
merge upstream changes
2008-06-30 14:01:10 -07:00
Dan Mills
d7df22716d
change onQuit dialog to wait for a running sync in order to start the last sync
2008-06-30 14:00:55 -07:00
Dan Mills
32d1262667
style fixes, js warning fixes
2008-06-30 14:00:06 -07:00
Dan Mills
fdde68445a
change AsyncException so it implements toString (which returns the original exception)
2008-06-30 13:58:42 -07:00
Anant Narayanan
7f8e383db6
Fix syntax errors that were causing unit tests to fail
2008-06-30 12:26:41 -07:00
Anant Narayanan
645c447eb6
Fix small bug with PasswordTracker returning scores > 100
2008-06-30 11:33:25 -07:00
Anant Narayanan
f7911b9746
Primitive password tracking support (bug 435320, r=thunder)
2008-06-30 11:19:07 -07:00
Dan Mills
8d3532f8e0
bump version
2008-06-29 17:40:49 -07:00
Dan Mills
cbd9cd6819
import async module
2008-06-29 17:37:11 -07:00
Dan Mills
a4ae67b71a
define _resetGUIDs in store
2008-06-29 17:36:59 -07:00
Dan Mills
091c571bd1
import async module
2008-06-29 17:36:35 -07:00
Dan Mills
293b220818
use this._lookup instead of command.data for remove commands
2008-06-29 17:36:13 -07:00
Dan Mills
b32d63ca14
bump version
2008-06-29 11:54:26 -07:00
Dan Mills
3d16ec76a6
fix cooe engine's resetGUIDs method by importing async module; don't call runInBatchMode in bookmark engine's resetGUIDs, it doesn't work atm
2008-06-29 11:44:27 -07:00
Dan Mills
80417871c4
merge upstream changes
2008-06-29 07:07:11 -07:00
Dan Mills
e03543007a
make resetguids async
2008-06-29 07:00:53 -07:00
Anant Narayanan
d2a1e9e87d
Make PasswordStore process removeCommands correctly (bug 442090, r=thunder)
2008-06-28 01:13:14 -07:00
Anant Narayanan
089c1c0f42
General restructure for performance improvements (bug 441907, r=thunder)
2008-06-27 20:16:43 -07:00
Dan Mills
c0471ca320
make log messages that print raw engine json be trace messages
2008-06-27 14:21:54 -07:00
Dan Mills
1c1346203f
merge upstream changes
2008-06-26 17:28:46 -07:00
Dan Mills
226de0e980
bump version to 0.1.32, storage format version (global & engine) to 3
2008-06-26 17:28:30 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
5856868591
Removed unneeded atob() and btoa() definitions from authenticationLayer.
2008-06-26 17:26:21 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
448ef4478e
Merged
2008-06-26 17:01:12 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
d654677b9a
Fixed several minor bugs with bookmark sharing
2008-06-26 17:00:55 -07:00
Dan Mills
9f77422143
merge upstream changes
2008-06-26 16:38:00 -07:00
Dan Mills
6f246308bc
don't even try to sync when the local lock is taken
2008-06-26 16:37:38 -07:00
Atul Varma
b31c786d84
Automated merge with http://hg.mozilla.org/labs/weave
2008-06-26 16:28:55 -07:00
Atul Varma
aa4a046d61
Added an additional check in stores.js to prevent a strict warning from appearing.
2008-06-26 16:27:54 -07:00
Dan Mills
8bc8c1abbb
when we abort a lock request because we already hold a token, reset _lockAllowed to allow further requests for locks
2008-06-26 16:26:14 -07:00
Anant Narayanan
62a0ebb31e
Add license headers to all files which didn't have them.
2008-06-26 14:49:01 -07:00
Dan Mills
277753d21a
tone down tab engine debugging output a bit
2008-06-26 14:34:32 -07:00
Dan Mills
703829a510
fix comment in verifyLogin
2008-06-26 14:30:38 -07:00
Dan Mills
5c7f8c6a40
check login status code in service's verifyLogin; attempt to create user directory when it's a 404
2008-06-26 12:27:54 -07:00
Dan Mills
6badbcac4d
merge upstream changes
2008-06-26 12:23:07 -07:00
Dan Mills
2d3216c74e
return http status code from dav's checkLogin
2008-06-26 12:22:19 -07:00
Anant Narayanan
dcb7a1ada2
Automated merge
2008-06-26 11:16:02 -07:00
Anant Narayanan
2339871cf6
Prevent multiple lock requests from being executed (bug 441922, r=thunder)
2008-06-26 11:15:02 -07:00
Justin Dolske
4abaf0f90c
bustage fix: call this.foo(), not foo().
2008-06-25 18:32:59 -07:00
Anant Narayanan
ee51a31ea5
Remove runCmd and other openssl related stuff we no longer need. (bug 441898, r=thunder)
2008-06-25 17:10:24 -07:00
Anant Narayanan
b53674f5dc
Handle removeCommand in FormEngine correctly. (bug 441874, r=thunder)
2008-06-25 17:09:18 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
3f37543011
Set up bookmarkEngine._incomingShareOffer to use Myk's new Notification stuff to offer a notification to the user, asking them to accept or reject the incoming share.
2008-06-25 15:54:33 -07:00
Myk Melez
cab1d95570
bug 436636: a system for showing various kinds of notifications in one consolidated location
2008-06-25 13:51:39 -07:00
Myk Melez
b379fdece8
the tabs engine needs a constant
2008-06-25 13:51:32 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
6f37a50f99
The share/stop sharing menu item is now added only to normal bookmark folders: Not to the main bookmark menu or to magic folders like 'recently tagged' or whatever.
2008-06-25 11:58:04 -07:00
Atul Varma
92f85d952e
Another automated merge. I'm kind of confused at this point, so I hope I'm not breaking anything by mis-merging.
2008-06-25 04:45:22 -07:00
Atul Varma
c747b0559e
Automatic merge.
2008-06-25 04:44:25 -07:00
Atul Varma
37225f431c
Changed AsyncException so that it dynamically subclasses the exception it's wrapping, and adds an 'asyncStack' property to allow access to the asynchronous call stack. This, along with my previous few commits, makes the processing of stack traces in our code much more streamlined, and also allows our debugging output to be more informative, as stack information is now logged from the point at which an exception was thrown, rather than the point at which it was caught.
...
Also renamed some things in async.js to be more descriptive and easier-to-understand, albeit a bit more verbose.
2008-06-25 04:43:07 -07:00
Myk Melez
be2bf638be
bug 441446: set mozBackgroundRequest on XMPP request object when created rather than when used, since it only needs to be set once
2008-06-25 01:56:17 -07:00
Justin Dolske
b015539e7a
Split account verification out from login(), make wizard work for using an existing account, related code cleanup/simplification
2008-06-25 00:22:53 -07:00
Atul Varma
9d7f1afc80
Made exception logging routines more informative and added logtests for them.
2008-06-25 00:13:36 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
1d19d1357f
Merged
2008-06-24 21:15:23 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
b24d0c7180
Moved all of the bookmark-share stuff out of the bookmarkEngine class into a new BookmarksSharingManager class.
2008-06-24 21:15:14 -07:00
Atul Varma
7b4737aed7
Fixed something that I should've changed in my last commit; also removed a call to Utils.stackTrace() that shouldn't have been made.
2008-06-24 19:58:50 -07:00
Justin Dolske
e25d17c184
Bustage fix: frame.filename can be null, and the async stack dump can then fail (which causes other problems)
2008-06-24 19:39:58 -07:00
Atul Varma
7327a55d0d
Renamed AsyncException.trace and Generator.trace to AsyncException.traceback and Generator.traceback, respectively, to distinguish them from Logger.trace() and also explicitly indicate their noun-like nature (since they're properties).
2008-06-24 19:15:54 -07:00
Atul Varma
caa3295271
Renamed the global trace() function in async.js to traceAsyncFrame(), to avoid confusing it with Logger.trace(), AsyncException.trace, and Generator.trace, all of which are also used in that file.
2008-06-24 19:08:35 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
bc4d891c3a
Moved the folder name and annotation for the incoming shares root folder to string constants.
2008-06-24 18:38:29 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
fcd94e31e2
Fixed all the places where I was accidentally calling it incomingShareAnno instead of incomingSharedAnno (note the missing letter d). Same for outgoingSharedAnno.
2008-06-24 18:28:01 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
4cba1fd51c
Removed all uses of the 'weave/mounted-shares-id' annotation, since it's been made obsolete by INCOMING_SHARED_ANNO.
2008-06-24 18:23:43 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
0edbf9998f
Changes in the annotations relevant to incoming/outgoing share folders are now handled by editCommands in the syncCore.
2008-06-24 18:15:17 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
4bc77b8e05
Annotations on incoming and outgoing share folders are now wrapped for sync, and handled on incoming createCommands.
2008-06-24 18:09:41 -07:00
Myk Melez
8dcf0279c4
bug 441446: set mozBackgroundRequest on XMPP request object when created rather than when used, since it only needs to be set once
2008-06-24 17:45:37 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
2158cdf9c4
Merged
2008-06-24 13:41:25 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
c4fa84f683
Merged
2008-06-24 13:41:12 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
03d94018af
Added todo about exception handling
2008-06-24 13:41:01 -07:00
chris@h-194.office.mozilla.org
95d87d63e0
merging
2008-06-24 12:44:26 -07:00
chris@h-194.office.mozilla.org
32d06ac143
added embedded verification method to login (this wants to be it's own object method, but should work well enough for now.)
...
some formatted cleanup for wizard.js
2008-06-24 12:42:52 -07:00
Dan Mills
e2fc25dbfa
Store each delta as a separate file on the server
2008-06-24 12:33:27 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
286e670fb2
Finished the bridge between UI code and bookmark engine so that stopSharing gets called when you pick the menu itme.
2008-06-24 12:22:32 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
ed99f7cb53
Make the stop-sharing-data command work
2008-06-23 18:23:08 -07:00
Justin Dolske
6ed3755104
Bug 433949 - Use WeaveCrypto component (NSS) instead of OpenSSL
2008-06-23 16:23:57 -07:00
Myk Melez
bb55bba909
Automated merge with ssh://hg.mozilla.org/labs/weave/
2008-06-23 16:22:17 -07:00
Myk Melez
9668227aad
wrap notify around lock instead of the other way around so that notify includes locking failure/success in its notifications
2008-06-23 16:22:05 -07:00
Myk Melez
6cdf7d9c0d
bug 435341: sync automatically when Firefox quits
2008-06-23 16:10:31 -07:00
Atul Varma
c573243c97
Removed a line of code that was raising a strict warning, and which also just defined an unused local variable that called no functions and therefore had no side effects (unless there were property getters that had side-effects involved, which hopefully wasn't the case).
2008-06-23 14:32:55 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
4489fb2ce3
The XMPP server is now configured to use LDAP for authentication (on sm-labs01, and soon to be on services.mozilla too) so the xmpp username/password will now be the same as the weave username/password. So I now use those to login, and I got rid of the two extra preferences which we used to have for xmpp username/password.
2008-06-20 17:19:10 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
7d953f2669
fixed some minor formatting
2008-06-20 16:46:38 -07:00
Myk Melez
e760fc6a12
make xmpp requests be background requests so they don't get horked by load group problems or throw up auth dialogs
2008-06-20 14:26:40 -07:00
Atul Varma
4c78f8d170
Improved test_passwords so that it syncs, re-syncs, adds a new user, and re-syncs again.
...
Fixed a strict warning in engines.js.
2008-06-20 14:22:06 -07:00
Atul Varma
4e39258260
Made the tracking of async generators/coroutines more robust for debugging purposes.
...
Refactored code in syncCores.js to use Utils.makeTimerForCall().
Improved test_passwords to perform an additional sync after the initial one.
2008-06-20 13:58:56 -07:00
Atul Varma
ac90aaff04
Refactoring: consolidated duplicate code creating GUIDs via XPCOM gunk into a new function, Utils.makeGUID().
...
Note that there are some strange things re: whitespace in engines/bookmarks.js in this changeset; I literally only changed one line, though, and I'm not sure where they came from. Maybe it was js2-mode?
2008-06-20 12:34:29 -07:00
Atul Varma
11abf27a3e
Minor code tidying.
2008-06-20 12:27:17 -07:00
Justin Dolske
58435fa195
Small bug fix from my last small bugfix. :(
2008-06-19 20:18:59 -07:00
Atul Varma
aa73eb4763
Fixed a bug in the outstanding-callback-warning system and made Generator.throw() and Generator.cont() private methods because no client code was using them and it could introduce bugs in the system if they do; we can revisit making them public again later if we want.
2008-06-19 19:03:10 -07:00
Atul Varma
237b9c8f1d
Removed warning message from ID.get() because it's actually normal to pass in an ID that doesn't exist to it, to test for its existence. Though perhaps there should be an exists() method for such a use case instead.
2008-06-19 16:37:53 -07:00
Atul Varma
93520a6e78
Added more fake prefs to the password test to eliminate strict warnings, added logging code to identity.js to aid in debugging.
2008-06-19 16:03:42 -07:00
Justin Dolske
50174a9bff
Fix reference to undefined function and bad async arg.
2008-06-19 15:36:24 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
4f11d0d14d
Fixed some more missing commas that were preventing engines/bookmarks.js from loading
2008-06-19 15:25:25 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
28bf4dc4f6
Added missing comma after function definition
2008-06-19 15:23:01 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
d58bdfe874
Backed out changeset 7720a1dd564a because the new crypto stuff that it uses hasn't been enabled yet.
2008-06-19 11:59:52 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
bff803b730
Applied dolske's patch from bug 433949 to make the bookmarkEngine work with the new improved Crypto interface.
2008-06-19 11:41:57 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
467eaba47c
merged
2008-06-19 10:51:54 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
5725f10629
Reimplemented most of _updateIncomingShare to work with the new implementation of _updateOutgoingShare. No more need for the ugly hack to temporarily set the root directory of DAV, hooray
2008-06-18 23:27:48 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
423c88e98c
Implemented _stopOutgoingShare (though it's still not being called from anywhere).
2008-06-18 23:00:09 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
624280ac82
Added documentation to createIncomingShare, rewrote it a little to be consistent with the other new stuff, and made it use annotations to keep track of the server path to the shared data.
2008-06-18 22:37:06 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
e4d31fe71d
Gave the bookmarksEngine a permanent (lazy-initialized) reference to the annotation service, rather than recreating the reference every single time we use the service. Which is a lot of times now.
2008-06-18 20:53:11 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
9cc02dd84a
Implemented _updateAllOutgoingShares in bookmarkEngine.
2008-06-18 20:45:01 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
f903901b8e
Removed an unneeded yield statement from startXmppClient (this was raising warnings about yeilding without a callback.)
2008-06-18 18:48:17 -07:00
Atul Varma
837747b2b8
Replaced boilerplate XPCOM code with calls to util.js functions.
2008-06-18 18:04:01 -07:00
Atul Varma
4165ed8219
Automated merge with http://hg.mozilla.org/labs/weave
2008-06-18 17:28:38 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
da54b30943
Turned all remaining dump()s in transportLayer.js into Log4Moz debug calls.
2008-06-18 17:23:04 -07:00
Atul Varma
e9670abd3f
Added a new property to async.js, Async.outstandingGenerators, which returns the number of generators that haven't yet been finalized. This can be used for diagnostic purposes to determine whether generators haven't yet been called back.
2008-06-18 16:11:15 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
110f387e1c
Imported Log4Moz to xmpp/transportLayer.js and xmpp/authenticationLayer.js, so they're no longer raising errors about Log4Moz being undefined (oops, sorry, should have tested before pushing.)
2008-06-18 14:59:06 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
5346076d1f
Merged
2008-06-18 14:53:30 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
51c929369d
XMPPClient sends its debugging output to log4moz (mostly debug level) now instead of dump, so it's less annoyingly verbose.
2008-06-18 14:50:02 -07:00
Atul Varma
30046913d8
Refactored some file operations into a new function in Utils and out of engines.js.
2008-06-18 14:12:24 -07:00
Justin Dolske
44f48bc439
You have: no tea. (Remove old TEA crypto support)
2008-06-18 13:25:58 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
8c09f36ad5
The xmpp messages that are sent when a share is offered now include the server-side path to the share directory.
2008-06-18 13:16:32 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
2a1462352b
Merged
2008-06-18 12:48:26 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
0bef123361
made all calls to Resource.get() and Resource.put() properly asynchronous.
2008-06-18 12:48:20 -07:00
Atul Varma
1ab8baed0c
Fixed typos.
2008-06-18 12:45:02 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
03cf0d6f73
Removed the check of whether the directory exists before creating it, in _createOutgoingShare(): realized it's not neccessary since DAV.MKCOL already does it.
2008-06-18 12:41:34 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
c7ac787fb1
Merged
2008-06-18 12:32:52 -07:00
Atul Varma
62236e45cd
Replaced a bunch of boilerplate XPCOM with a call to Utils.makeTimerForCall().
2008-06-18 12:32:20 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
68669b6a0f
Merged changes
2008-06-18 12:29:39 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
6503df042f
Added documentation to BookmarkEngine._updateOutgoingShare.
2008-06-18 12:29:25 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
eb2aa3c9bb
Complete rewrite of _createOutgoingShare and _updateOutgoingShare in BookmarkEngine, using remote.Resource objects and Crypto.
2008-06-18 12:26:51 -07:00
Atul Varma
ce9f6b0af8
Removed an unused constructor parameter from PasswordEngine.
2008-06-18 12:04:49 -07:00
Atul Varma
22a628bfea
Moved XPCOM-specific stuff from engines/passwords.js to util.js so they could be easily stubbed-out by unit tests.
2008-06-18 11:54:24 -07:00
Atul Varma
90d243db16
Refactored test_service and module code so that the weave service constructor is called, and auth is done more accurately.
2008-06-17 19:54:09 -07:00
Atul Varma
6b20868829
Fixed a minor typo, though there's a better way to do the unary getter which Myk told me about; will probably substitute that soon.
2008-06-17 11:11:56 -07:00
Atul Varma
f9463209a2
Added a fixme/todo in the code.
2008-06-17 10:23:35 -07:00
Dan Mills
dec04b1bc3
merge upstream changes
2008-06-17 18:04:16 +09:00
Dan Mills
0c3a240876
make RemoteStore a but more Store-like (wrap, wipe methods); fix a missing yield
2008-06-17 18:03:02 +09:00
Dan Mills
5e07cb98d5
Don't allow re-entrance! Fail to lock when we already hold a lock.
2008-06-17 18:01:48 +09:00
Atul Varma
245e6492da
Fixed a strict warning in util.js.
2008-06-16 18:11:41 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
43eec5b867
In the middle of trying to make createOutgoingShare work with Dan's changes (getSymKey having been moved to remote.js, etc.)
2008-06-16 17:52:24 -07:00
Dan Mills
5c196a641a
treat paths beginning with '/' as absolute
2008-06-17 09:51:02 +09:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
f6cc70889f
Trying to debug _createOutgoingShare...
2008-06-16 15:52:15 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
6ce93ffd1d
Merged
2008-06-16 11:24:41 -07:00
Dan Mills
f8a841ee5e
move more remote-interaction code into RemoteStore (and out of Engine)
2008-06-17 01:04:23 +09:00
Dan Mills
f74b9f910f
catch 404s from initSession and do an initial upload; fix some bugs (missing yields, references to Engine properties) in RemoteStore.initialize
2008-06-16 00:21:44 +09:00
Dan Mills
a8ad7d2804
merge upstream changes
2008-06-15 13:42:10 +09:00
Dan Mills
561b27a92c
merge upstream changes
2008-06-14 17:10:40 +09:00
Dan Mills
049ecf1de3
Move remote init code ('fullUpload') into RemoteStore; make RemoteStore hold an Engine object (tightly coupling them); make the server prefix and identity properties of Engine public
2008-06-14 17:07:06 +09:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
9805cdce23
Merged
2008-06-13 16:22:04 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
835100b96d
Fixed some minor bugs -- the name of the incoming shared folder is parsed correctly, and xmppClient now catches bounce errors that were previously parsed as messages.
2008-06-13 16:20:43 -07:00
Atul Varma
92583fc5ff
Fixed an 'outstanding callbacks' warning and simplified the code a tiny bit.
2008-06-13 15:39:06 -07:00
Myk Melez
b12f3d03db
use nsIXMLHttpRequest::mozBackgroundRequest instead of DummyAuthProvider to suppress authentication dialogs and ensure XMLHttpRequests succeed even when the window that originated the request goes away
2008-06-13 13:08:36 -07:00
Dan Mills
589f3222eb
To avoid some async.js warnings: Turn some 'yield' calls into 'return' ones, and don't call 'self.cb' twice in a row when constructing event listeners for XHRs.
2008-06-13 15:49:18 +09:00
Dan Mills
9812ba557e
Make some 'debug' log calls into 'trace' ones. Use the frame formatter, which will remove long paths to extension dirs from the output. Don't warn about outstanding callbacks if we caught an exception from the generator.
2008-06-13 15:47:41 +09:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
5c8481de3d
Merged
2008-06-12 17:35:57 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
c548d4b940
Made the initialization of the xmppClient an asynchronous call. This included modifying xmppClient.js so that connect() can be passed a callback function that will get called once the connection has succeeded or failed. For most of our purposes this is probably a better API than what we had before where you call waitForConnection() and it busy-waits until the connection has succeeded or failed.
2008-06-12 17:35:44 -07:00
Myk Melez
b4967c8831
work around XmlHttpRequest bug 317600 by pausing for a 0ms timeout before trying to log in
2008-06-12 16:23:59 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
b462aad4a5
Merged changes.
2008-06-12 14:30:46 -07:00
Myk Melez
18d8e8fcd7
bug 410550: stop running scheduled sync when the user is not logged into weave
2008-06-12 12:36:58 -07:00
Atul Varma
9d32240087
Changed some of the debug() logging statements I added a few commits ago into trace() statemetns b/c they were drowning the log.
2008-06-12 12:00:19 -07:00
Myk Melez
f47209b9d2
only retrieve score once per engine when doing a scheduled sync, since retrieving the score can be a non-negligible cost for trackers that calculate the score on-demand (like the tab tracker)
2008-06-11 20:07:35 -07:00
Myk Melez
669e57136f
Automated merge with ssh://hg.mozilla.org/labs/weave/
2008-06-11 20:00:59 -07:00
Myk Melez
5d50fffd37
don't sync tab entry IDs, which change with every session, to avoid generating edit commands for every tab on restart even when the tabs haven't actually changed
2008-06-11 20:00:48 -07:00
Atul Varma
4864f07ae2
async.js now keeps track of how many outstanding callbacks it has and uses this information to log warnings about coroutines that may have yielded without an outstanding callback, and coroutines that may have finished while a callback is still outstanding. These are merely 'warnings' rather than certainties because this code assumes that there is a 1:1 correspondence between accesses to self.cb and yields, and also that self.cb's are actually passed to asynchronous functions. It'd be really cool if we could actually keep track of whether a callback got garbage collected before it was called or something, though I don't know how much it'd help in the end.
2008-06-11 19:19:16 -07:00
Atul Varma
7d98a5dbeb
Added a few log messages to hopefully make the debugging of generators easier. Also added an id component to generators, which is part of their name, to help distinguish between concurrent instances of the same generator function. The following debug output represents the new logging infomation:
...
--
Async.Generator DEBUG runTestGenerator-0: self.cb generated at test_async_missing_yield.js:28
Async.Generator DEBUG secondGen-1: self.cb generated at test_async_missing_yield.js:20
Async.Generator DEBUG secondGen-1: done() called.
Async.Generator DEBUG runTestGenerator-0: self.cb() called, resuming coroutine.
Async.Generator DEBUG runTestGenerator-0: done() called.
Async.Generator DEBUG secondGen-1: self.cb() called, resuming coroutine.
Async.Generator DEBUG secondGen-1: done() called.
Async.Generator ERROR Async method 'secondGen-1' is missing a 'yield' call (or called done() after being finalized)
--
As you can see, I've added log messages whenever the Generator's 'cb' property is accessed--this is almost guaranteed to be very close to a 'yield' statement, and therefore provides us with a decently accurate idea of where the generator 'stopped'. We also log a message when the generator continues, and by doing so we get an idea of how the coroutines interleave.
Another idea I had was to actually match calls to self.cb with calls to 'yield' to automatically detect e.g. two yields in a row (which will ordinarily result in a generator 'hanging'), a generator exiting while a self.cb still hasn't been called, but I'm not sure what kinds of reprecussions it may have.
2008-06-11 18:58:30 -07:00
Myk Melez
a850ec7b70
numChanged should be the number of shared items whose data is different, not the same
2008-06-11 18:47:56 -07:00
Maria Emerson
7da4259fee
bug 438033: implement a better first-run wizard process; r=myk
2008-06-11 17:56:02 -07:00
Myk Melez
0a15090c8c
bug 437529: yield after starting to put the status file to the server so we don't finalize the sync until the PUT request completes
2008-06-11 17:44:08 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
97f788bb51
Fixed Utils.prefs.getStringPref (should be getCharPref)
2008-06-11 15:43:12 -07:00
Myk Melez
8182b10abf
resetting the score is not an asynchronous operation, so Service::_syncEngine shouldn't yield after calling it
2008-06-11 15:23:54 -07:00
Myk Melez
633afe0864
clarify wording in scheduled sync threshold debug statements
2008-06-11 14:16:03 -07:00
Myk Melez
555b8a7be4
fix typo in recent checkin that broke appending deltas to the deltas file on the server
2008-06-11 14:14:04 -07:00
Myk Melez
2b2192aca5
once sync thresholds reach 1 (the lowest possible value), leave them there until something changes and we sync
2008-06-11 13:50:47 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
5459e1733a
Resolved merging conflicts to service.js.
2008-06-11 11:54:44 -07:00
jonathandicarlo@localhost
4bb05d10b5
Created preferences for xmpp connection info (server url, realm, username, password), and a preference to turn xmpp messaging on or off, and made BookmarkEngine._init() call startXmppClient when this preference is true.
2008-06-11 11:13:35 -07:00
jonathandicarlo@localhost
918cc51c7f
Expanded bookmarkEngine.share and added some more todos for the next round of functions to implement
2008-06-11 11:01:45 -07:00
Myk Melez
932871d1bd
merge
2008-06-11 10:41:57 -07:00
Myk Melez
4a8808e790
bug 430363: ignore remove commands when generating deltas for history so the deltas file on the server doesn't grow too large; r=thunder
2008-06-11 10:40:24 -07:00
Myk Melez
482d745360
bug 434816: use a decreasing threshold algorithm for the periodic scheduled sync to make sure we eventually sync even small changes to data; r=thunder
2008-06-11 10:38:25 -07:00
Dan Mills
5ca3a1eb7f
merge upstream changes
2008-06-11 23:31:28 +09:00
Myk Melez
0f8b279e6e
give Engine a public getter for its snapshot that TabTracker can access when generating a sync urgency score
2008-06-11 00:03:28 -07:00
Dan Mills
de1d1acb26
Various changes:
...
Engine/RemoteStore:
* Move code to make the engine remote directory into RemoteStore.
* Fix initSession call in Engine to properly use callback / call yield.
* Do not check '_getServerData' return status in _sync, we will use exceptions from RemoteStore instead.
* Move code to push a new delta into RemoteStore (appendDelta()). Currently comments out code that forces a re-upload in cases where the server (engine) format version was different. We may add this back later into RemoteStore (?).
* Note that this patch also removes the 'this._encryptionChanged' conditional, which I believe is currently useless (we never set it).
Service:
* When wiping the server (due to a server version mismatch), skip .htaccess files, since they are usually not user-modifiable.
2008-06-11 11:12:04 +09:00
Anant Narayanan
9cb5d2c8cc
Make sync service check score before syncing: bug #434816 (r=thunder)
2008-06-10 13:45:37 -07:00
Atul Varma
9cc4da48c1
Refactoring: made a new function, Utils.makeTimerForCall(), which is used by test suites and async.js.
2008-06-09 19:30:11 -07:00
Atul Varma
2905492e20
Added modules/sharing.js, which provides access to the RESTful sharing API, and a unit test suite. The unit test suite is pretty heinous right now and should get a bit of refactoring.
2008-06-09 18:55:26 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
dece7fdbd2
Merged
2008-06-09 18:44:21 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
b22dd7428c
Fixed a couple of minor bugs that were preventing bookmark share from starting (like, i was skipping enabled engines instead of disabled engines... duhh)
2008-06-09 18:44:13 -07:00
Atul Varma
6fc267b942
Fixed a bug that was causing failing unit tests using async.js to not properly report error conditions.
2008-06-09 18:40:30 -07:00
Atul Varma
813c1abb3f
Added a POST method to dav.js.
2008-06-09 17:36:54 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
dc2d1940dd
Moved the writing of the outgoing-share annotation on the bookmark folder to BookmarkEngine._share, where it makes a lot more sense than it does in the share.js dialog-box code where it used to be.
2008-06-09 16:49:04 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
7ca2dae349
Fixed a couple minor bugs that were preventing bookmark engine from starting up properly
2008-06-09 16:19:58 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
a1c5da3eeb
Renamed bookmarkeEngine methods so they make more sense with the new sharing model, e.g. updateAllIncomingShares instead of syncMounts.
2008-06-09 15:27:09 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
6ad669df96
Merged
2008-06-09 12:13:03 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
dfdff82d82
The folder annotation for outgoing shared folders is now a string containing the username of the person the folder is being shared with. Also moved to using const strings in bookmark-menu-overlay.js.
2008-06-09 12:12:51 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
8573f956e3
Merged
2008-06-09 11:49:04 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
b6a2028a3c
Fixed my code so that BookmarkEngine._sync() now works correctly to call Engine._sync() and BookmarkEngine.syncMounts(), asynchronously. Added in some TODO comments about what's going to happen in the next round of refactoring.
2008-06-09 11:48:52 -07:00
Atul Varma
53f7206dec
Just added a few semicolons that js2-mode warned me about.
2008-06-09 09:45:55 -07:00
Atul Varma
394167a10a
Added a unit test suite for modules/async.js.
2008-06-06 21:40:30 -07:00
jonathandicarlo@localhost
f26ddc5f76
Added license block and explanatory comments to bookmarks.js
2008-06-06 19:28:01 -07:00
jonathandicarlo@localhost
98d1bf05f4
Made BookmarkEngine.sync() responsible for calling BookmarkEngine.syncMounts (to get the incoming shared bookmark folder contents), eliminating the FIXME that previously had this being called from special-case code in WeaveSvc.sync().
2008-06-06 19:22:23 -07:00
Atul Varma
29434b62a4
Merged changes.
2008-06-06 17:46:46 -07:00
Atul Varma
49ad148d83
In async.js, renamed 'object' to 'thisArg', which makes the code clearer and easier to understand.
2008-06-06 17:46:34 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
473352178e
Resolved conflicts with Chris's changes (to use the username, unhashed, as the name of the server-side sharing directory)
2008-06-06 17:43:15 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
3db8dcb84c
Moved _createShare and _share() from engines.js to BookmarkEngine class in engines/bookmarks.js. The identity of the folder to be shared is now passed from the share dialog box (share.xul) into BookmarkEngine._share().
2008-06-06 17:33:44 -07:00
chris@h-194.office.mozilla.org
d7c750f0f9
- this check in will break everyone temporarily, as it involves the changes necessary to shift us from sha1(email) to usernames, and to enable sharing on the server.
...
- we are also changing the default preferences on the trunk to point to the new staging server at https://sm-labs01.mozilla.org:81 that has been modified to support usernames
- everyone will need to create a new account and this will be streamlined within the startup function, which will now kick off on first run (we'll check in the updated setup wizard shortly)
- this checkin also cleans up a number of strings
2008-06-06 14:18:50 -07:00
Myk Melez
f096ecbbf4
bug 437523: fix NS_ERROR_FAILURE on nsIJSON.decode in JsonFilter_afterGET
2008-06-05 16:25:55 -07:00
Dan Mills
b32b7d3549
merge upstream changes
2008-06-05 23:11:20 +09:00
Dan Mills
c2081e7fb9
create objects for the various server resources (these will later abstract away the actual resources); fix a bug where we were reversing the order of resource filters on every GET request
2008-06-05 16:17:32 +09:00
Dietrich Ayala
406a97aee2
imported patch xmpp-transport-fault-tolerance-and-test
2008-06-04 18:34:37 -07:00
Dietrich Ayala
ecbfb93933
xmpp-stream-error-handling
2008-06-04 17:36:37 -07:00
Dietrich Ayala
3d3869c8a5
[mq]: xmpp-reconnect
2008-06-04 17:00:02 -07:00
Dietrich Ayala
3e4256b313
[mq]: xmpp-disconnect
2008-06-04 14:02:47 -07:00
Myk Melez
b3bf939ec2
bug 436696: make sure we pass a valid URI to nsITaggingService::getTagsForURI when the bookmark record doesn't include a URI so the method doesn't throw and hork bookmarks sync
2008-06-04 13:40:53 -07:00
Dietrich Ayala
6805970f17
[mq]: xmpp-cleanup
2008-06-04 12:14:28 -07:00
Atul Varma
3a9ddcad85
In passwords.js, turned _hashLoginInfo() into a module-level function.
2008-06-03 16:56:58 -07:00
Atul Varma
d8420aaf50
Minor js2-mode warning fixes.
2008-06-03 15:14:27 -07:00
Atul Varma
e5bb509e17
Removed unused code from cookies.js, fixed a few js2-mode warnings.
2008-06-03 14:49:22 -07:00
Atul Varma
b74958a214
Moved all tab-syncing code to modules/engines/tabsjs.
2008-06-03 14:45:53 -07:00
Atul Varma
daf3be7564
Moved all form-syncing code into modules/engines/forms.js.
2008-06-03 14:20:51 -07:00
Atul Varma
1e0a1d1e06
Moved all password-syncing code into modules/engines/passwords.js.
2008-06-03 14:08:53 -07:00
Atul Varma
e2ce660c53
Moved all history-related functionality into modules/engines/history.js.
2008-06-03 13:56:16 -07:00
Atul Varma
f365f924cf
Re-removed cookie-related changes that were accidentally re-added by c1a58b24679c and/or 5a49daf87c94.
...
Also moved all bookmark syncing logic into modules/engines/bookmarks.js.
2008-06-03 12:38:48 -07:00
Myk Melez
d635f80fdc
remove unused _json property from TabSyncCore
2008-06-03 11:50:08 -07:00
Myk Melez
690e2b800c
merge
2008-06-03 11:43:07 -07:00
Myk Melez
07ba8ea83e
bug 434817: sync tabs
2008-06-03 11:32:59 -07:00
Atul Varma
ada0204cac
Moved all code related to the syncing of cookies--e.g. CookieStore, CookieTracker, CookieEngine, CookieSyncCore--into their own file at modules/engines/cookies.js. I'll be doing the same to the other engines shortly.
...
This helps with code organization--all the logic for dealing with a particular data type is now in one place--and should also make it easier to write unit/regression tests.
2008-06-03 11:11:44 -07:00
Myk Melez
2d0bcb7a9b
minor typo fixes
2008-06-02 15:24:52 -07:00
Dan Mills
d526a56d57
log stack traces from sync exceptions
2008-06-02 13:02:04 +09:00
Dan Mills
5eac28e81c
change remote store to keep track of identity names/aliases and fetch the objects from the id manager
2008-06-02 11:10:11 +09:00
Dan Mills
2daecc268e
move json and crypto into remote resource 'filters', so the engine doesn't have to explicitly encode/decode anything. note--known regression: filters will not use the encryption algorithm in the status file
2008-05-30 20:43:55 -07:00
Dan Mills
0640f244d6
format exception correctly when an engine throws during sync
2008-05-30 17:40:08 -07:00
Dan Mills
edff2a32aa
make some async generator errors clearer
2008-05-30 17:38:27 -07:00
Atul Varma
b9a3944d7e
Added a trivial appender to faultTolerance.js.
2008-05-30 16:32:06 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
e9a097b252
Merged changes
2008-05-30 11:11:02 -07:00
Atul Varma
243f1bce21
Refactored logging system so that clients don't need to call factory functions to create specific instances of formatters and appenders.
2008-05-29 18:15:50 -07:00
Atul Varma
8b2854d7e6
Added a testing suite for log4moz, along w/ a few refactorings necessary to perform the tests.
2008-05-29 17:56:52 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
4343b5c692
Merged
2008-05-29 11:18:16 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
6031b5a316
Moved the Share Bookmarks item out of the Weave popup menu into the Bookmarks menu, folder submenu.
2008-05-29 11:17:54 -07:00
Dan Mills
88bafd3245
Add and start using an object to represent a remote resource (file), and a server object to hold them. Resources will attempt to retry network operations if they fail.
2008-05-28 20:11:39 -07:00
Atul Varma
c00c81efab
Added a trivial fault tolerance JS module with a trivial test suite.
2008-05-28 11:25:28 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
c8b1c91b51
Created a cookie tracker in trackers.js, and a test for it in tests/unit/test_cookie_store.js.
2008-05-27 09:44:26 -07:00
Dan Mills
ecd321f34b
bump version constant
2008-05-24 18:56:42 -07:00
Dan Mills
c682a760f9
remove some debugging output, fix some remaining array detection code
2008-05-24 17:30:22 -07:00
Dan Mills
fd0eac8eb3
continue sync of other engines even after one of them throws an exception; use constructor name instead of instanceof to check for array object in modules
2008-05-23 23:58:53 -07:00
Dan Mills
fe48398743
don't attempt to get a symkey if encryption is set to 'none'
2008-05-23 19:57:38 -07:00
Dan Mills
cb84d724f5
regenerate the engine id when the engine's pbe id changes
2008-05-23 19:47:25 -07:00