Commit Graph

447 Commits

Author SHA1 Message Date
Philipp von Weitershausen
4678af4c19 Bug 584402 - Audit references across XPCOM borders [r=mconnor]
Use weak references for observers.
2010-08-04 21:07:53 +02:00
Philipp von Weitershausen
d2bdde4533 Bug 584402 - Audit references across XPCOM borders [r=mconnor]
Nuke refs to XPCOM services on shutdown.
2010-08-04 21:07:27 +02:00
Mike Connor
31d5c911e8 Bug 584369 - history sync is busted on tip, r=philiKON 2010-08-04 11:07:50 -04:00
Mike Connor
9be564a5ca [mq]: weakRefForms 2010-08-04 10:42:09 -04:00
Paul O’Shannessy
4cdd8a43b7 Bug 545752 - DB Statements aren't finalized in HistoryStore [r=mconnor]
Also nullifies the cached service so we don't leak.
2010-08-04 14:59:34 +02:00
Paul O’Shannessy
69a6017b51 Bug 584040 - Fix leaky tests [r=mconnor]
Make sure we explicitly nullify the cached services in the BookmarksStore & BookmarksTracker.
Also, explicitly finalize the statement if it was created.
2010-08-04 14:50:44 +02:00
Philipp von Weitershausen
23ee08503e Bug 580158 - Change Firefox Sync behavior in Private Browsing mode [r=mconnor]
Don't disable sync when in private browsing. When in explicit private browsing mode (either via menu item or -private command line flag), have tabs engine not provide data.
2010-07-19 23:07:45 -07:00
Edward Lee
eca54fde2e Bug 575423 - Forced syncs fail to upload some history [r=mconnor]
Select from views to get disk and memory data now that async makes it not block.
2010-06-29 11:18:21 -07:00
Philipp von Weitershausen
43920b5e3d Bug 572436 - Get rid of app-specific hacks (switch (Svc.AppInfo.ID)) in sync library [r=mconnor]
Set relevant default preferences programmatically in app specific overlays, making app-specific code paths in the sync library unnecessary.
2010-06-16 23:11:40 +01:00
Edward Lee
46e1de249f Bug 570636 - Decide how to co-exist as a sync add-on and built-in sync [r=mconnor]
Migrate prefs from extensions.weave. to services.sync. when loading the service for the first time before migration.
2010-06-16 14:30:13 -07:00
Edward Lee
4e55362a90 Bug 570636 - Decide how to co-exist as a sync add-on and built-in sync [r=mconnor]
Map the modules directory to services-sync instead of weave and update imports.
2010-06-16 14:30:08 -07:00
Edward Lee
61f3668330 Bug 562878 - Override for machine name [r=mconnor]
Allow setting of the computer name during Firefox account setup and from prefs. Also allow setting device name from Fennec prefs. Fix up strings for Fennec.
2010-06-11 11:36:51 -07:00
Edward Lee
fd2b51aee6 Bug 566061 - After server syncing, lightweight themes do not get applied to Chrome [r=mconnor]
Make sure the pref exists (is a bool) before trying to access its value.
2010-06-10 10:57:49 -07:00
Edward Lee
1fdb100093 Bustage fix for bug 570635 to check null for item.guid instead of item. 2010-06-09 16:10:38 -07:00
Edward Lee
ef8599f8c5 Bug 570635 - Use async queries for fetching form data [r=mconnor]
Create a Utils.queryAsync to wrap executeAsync that fetches all rows and columns by name. Update form and history engines to use it.
2010-06-09 09:35:01 -07:00
Edward Lee
b217211241 Bug 565411 - Accept max_results as a parameter to allow configuring the number of history items. [r=mconnor] 2010-06-02 15:18:01 -07:00
Edward Lee
653b88df98 Bug 565411 - Sync 5000 most frecent pages instead of 1000 recent for first sync [r=mconnor]
Use an async sql query to get uris by frecency instead of query result nodes, and wrap it with sync/async to keep the sync interface without blocking UI. Rough timings of getAllIDs: old 1k = 1.6sec blocking; old 5k = 2.7sec blocking; new 1k = .2sec non-block; new 5k = .6sec non-block.
2010-05-13 11:44:19 -07:00
Edward Lee
c2d690b112 Bug 568256 - form history changes breaks form sync, FF search bar, probably more [r=mconnor]
Check for both old and new class IDs and use the one that exists when wrapping. Also add FormTracker as the observer object so that its notify function is correctly called by nsHTMLFormElement.

--HG--
extra : rebase_source : 470430eaa643415e635836db3c38fb639a4e44b6
2010-05-26 11:56:04 -07:00
Edward Lee
b7c52221c4 Bug 563989 - Reset Sync option 3, doesn't properly propagate to other clients [r=mconnor]
Always sync client data by making sure it's always enabled and only update local cilent with remote commands. Make sure to sync clients to get a list of clients that need to receive commands. Also, make sure to upload data after wiping remote now that remoteSetup happens before wipeRemote.
2010-05-05 17:16:17 -07:00
Edward Lee
f65cfa40d2 Bug 561839 - import PlacesUtils.jsm instead of utils.js [r=mconnor]
Try the new PlacesUtils file before the old utils.js.
2010-05-04 12:14:48 -07:00
Mike Connor
2c1b819cdf Bug 561382 - Theme doesn't dynamically switch on sync to default theme, r=Mardak
--HG--
extra : rebase_source : e2a8fe1659816065cd162c2514336ec6f5a07521
2010-05-03 16:44:18 -04:00
Edward Lee
ff3ec7ac67 Bug 559163 - Don't select from slow indexless views for just one item [r=mconnor]
Just select from moz_places instead of _view where data might be slightly stale but good enough.
2010-04-29 14:36:15 -07:00
Edward Lee
d98d0bfafa Bug 554836 - On idle occurs 'JavaScript component does not have a method named: "onDeleteVisits"' [r=mconnor]
Add onDeleteVisits in addition to onPageExpired to maintain compatibility with old and new API.
2010-04-29 16:42:39 -07:00
Edward Lee
69584666ee Bustage fix from sync-asyncExecute: don't throw as the old code would catch and implicit return undefined. 2010-04-29 15:18:05 -07:00
Edward Lee
3c6fd67fb6 Bug 553709 - Syncing "Browsing History" uses 100% of a CPU core for extended periods [r=mconnor]
Sync asyncExecute to avoid forcing synchronous waits on disk but keep existing calling conventions (no callbacks) for callers by using Sync.
2010-04-29 14:36:15 -07:00
Edward Lee
ffe2ddb849 Bug 558077 - Bookmark folder and its contents lost under certain conditions of syncing same named folder [r=mconnor]
Mark entries as dupe if they're known to be dupes locally so that receiving ends won't bother looking for dupes for these items.

--HG--
extra : rebase_source : 2623f7ed20160ba445b58f538c3397caa0ef78e3
2010-04-29 14:36:09 -07:00
Mike Connor
f2d003872f Bug 562159 - Tabs from other computers don't show at about:weave-tabs, r=Mardak
--HG--
extra : rebase_source : 6e585fc3ddf75f3654286c08f1cd660586ce2de3
2010-04-28 22:20:08 -04:00
Mike Connor
11c85ae589 Bug 526012 - audit observer service usage, r=mardak 2010-04-20 21:56:44 -04:00
Edward Lee
9d76d3dc30 Bug 553402 - New pages in a tab aren't synced [r=mconnor]
Trace pageshow events to indicate that new tab data should be uploaded. Because scores must be integers, still increment the score by 1, but only do that 10% of the time for pageshows.
2010-04-21 16:35:51 -07:00
Edward Lee
7493d97441 Bug 558191 - Theme/persona sync sometimes doesn't happen until restart of client [r=mconnor]
Wait until all lightweight theme prefs have synced before poking at the lightweight theme manager.
2010-04-21 13:41:18 -07:00
Edward Lee
be8613110f Bug 437277 - update daily backup before first bookmark sync [r=mconnor]
Share an archiveBookmarks function that wraps the PlacesUtils call to be used from storage.wipe and first sync.
2010-04-21 11:10:32 -07:00
Edward Lee
5771a28188 Bug 558654 - Firefox crashes every ~2min after update to 1.2 [r=mconnor]
Limit the number of initial form entries to 500 ordered by "frecency".
2010-04-11 12:34:27 -07:00
Edward Lee
4bc0d28e5b Bug 558264 - Form data fails to sync when there's nothing to upload [r=mconnor]
Wrap the createStatement calls to guard against missing guid columns and lazily add it.

--HG--
extra : rebase_source : c59a692c6ad08321835c75023b54f02e8d1964da
2010-04-09 10:20:58 -07:00
Edward Lee
9dea7f5571 Bug 557503 - bookmark restore from backup and server-wins interact badly [r=mconnor]
Don't resetLastSync as that will make local changes look old and instead mark each as changed now that addChangedID doesn't jsonSave on each call.
2010-04-06 11:59:50 -07:00
Edward Lee
37ec3dd78c Replace tabs in files under source/ with appropriate number of spaces. 2010-04-02 16:37:53 -07:00
Edward Lee
3b4aa0220d Bug 550627 - Default reconciliation to server wins for older changed items [r=mconnor]
Save the time the tracker adds a new changed id and use that to compare the age of the record on the server vs the age of the local change to decide if it's server wins or client wins. Fix up various direct uses of changedIDs to use the API and make the save-to-disk lazy to avoid excessive writes. Add a test to make sure addChangedID only increases in time.
2010-04-01 15:54:53 -07:00
Edward Lee
e2f2dee6c3 Bug 546768 - form history uses hashes for GUIDs [r=mconnor]
Write a FormWrapper that knows about GUIDs and get/sets them in moz_formhistory as needed. It lazily adds the columns on failure and lazily generates GUIDs for entries that are missing it. Don't eagerly create a sha1 formItem mapping -- don't create it at all, so empty syncs will be much faster too.
2010-04-01 15:29:16 -07:00
Edward Lee
5833da7aa7 Bug 556361 - New searches from the searchbar don't get synced [r=mconnor]
Add a component that notifies when satchel methods are getting called. The notifications come as "form-notifier" with JSON data of the function name, arguments, and type (before vs after).
2010-04-01 15:21:54 -07:00
Edward Lee
ab278f01cd Bug 556509 - folders description not synchronised [r=mconnor]
Allow descriptions to be set on folder records and set description on creation.

--HG--
extra : rebase_source : d380f5d28130bd53532e5b4d293468aa053c19b2
2010-04-01 15:11:42 -07:00
Edward Lee
05af24a32c Bug 535326 - Need to rethink tab sync limit of 25 [r=mconnor]
Fit as many tabs as possible in 20000 characters by linearly estimating how many will fit then remove extras one by one.

--HG--
extra : rebase_source : 1ef3700a9cddd7e3cb0f96b9affada15e98ea672
2010-02-17 18:24:22 -08:00
Mike Connor
23d76a73c9 bug 539056 - Better Tab sync UI and discoverability, r=Mardak
--HG--
extra : rebase_source : d0c98d78b889ed74f5b130077a6ee1806bd81282
2010-03-12 16:14:09 -08:00
Paul O’Shannessy
9aefb399d5 Bug 555015 - JavaScript strict warning: bookmarks.js: undeclared variable record [r=Mardak]
Just make sure the record variable is declared before using it.
2010-03-25 13:58:27 -07:00
Edward Lee
21f7747109 Bug 548066 - JavaScript strict warning: clientData.js, line 194: reference to undefined property this.clients[id] [r=mconnor]
Get rid of get/setInfo on ClientEngine and ClientStore and expose functions to read/modify client data: stats, clearCommands, sendCommand. Also expose the local client information as local[ID,Name,Type,Commands] and rework the storage to use these instead of trying to keep the JS object clients entry in sync with prefs, etc. Update users of the old interface (service/tabs/chrome) to use the new local*. Set the client type based on app id instead of from each app's overlay.
2010-03-16 16:39:08 -07:00
Edward Lee
15e1f02e87 Bug 554427 - Move syncID from clients.js to service.js [r=mconnor]
Switch from Clients.syncID to this.syncID for service.js. Don't special case resetSyncID and just use = "".
2010-03-25 16:52:45 +00:00
Edward Lee
af0bf0ab2a Bug 546772 - Encrypt the clients records [r=mconnor]
Store data in cleartext instead of directly in the payload to have it encrypted with the CryptoWrapper. This cleans up some hacks needed to get the plain WBO client record to behave nicely with other encrypted data.
2010-03-16 16:31:55 -07:00
Edward Lee
dced4ea743 Bug 554472 - Only sync prefs under extensions.weave.prefs.sync. (with a trailing dot) [r=mconnor]
Add a "." to the end of WEAVE_SYNC_PREFS value and fix up uses that did extra work to remove the dot (or something that might not have been a dot).
2010-03-23 18:51:47 -07:00
Paul O’Shannessy
59471f450c Bug 548939 - Use SessionStore in tab engine [r=Mardak]
Created a fake SessionStore service for Fennec that imitates the parts of Firefox's SessionStore API that we need. Then used the now "consistent" SessionStore service in the Tabs engine.
2010-03-16 15:14:32 -07:00
Edward Lee
1ce05d4603 Bug 549633 - Standardize record creation so all SyncEngines encrypt data [r=mconnor]
Always add the id and encryption value so client and delete records can be encrypted.
2010-03-05 14:46:48 -08:00
Edward Lee
a9c2e6c4c2 Bug 549632 - Remove storage cache, which is mostly un/incorrectly used [r=mconnor]
Remove incorrectly used cache from some engines and clean up references from SyncEngine.
2010-03-05 14:43:11 -08:00
Paul O’Shannessy
f39831ac01 Bug 546397 - Exception: Clients.getClients()[Clients.clientID] is undefined [r=Mardak]
Overrode _wipeClient in ClientEngine; treat resetting the same as wiping.
2010-02-19 13:36:42 -08:00