Closed Bug 570636 Opened 14 years ago Closed 14 years ago

Decide how to co-exist as a sync add-on and built-in sync

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Mardak, Assigned: Mardak)

References

Details

Attachments

(3 files, 2 obsolete files)

Eventually when sync is part of the platform, the add-on needs to still install/work if it adds new functionality over what's provided by the platform.
Flags: blocking-fx-sync1.4+
Target Milestone: --- → 1.4
Things to do:

chrome:

make chrome registration for UI pieces only happen for appversion <= last_version_without_sync

components:

XPCOM magic

modules:

resource:// override (will change from weave to sync-services) will Just Work
Assignee: nobody → edilee
Blocks: 571902
Attachment #451362 - Flags: review?(mconnor)
Attached patch v1 appversion (obsolete) — Splinter Review
I just pulled 3.7b1pre and 2.0b1pre out of nowhere! I'll poke mobile and firefox people..
Attachment #451367 - Flags: review?(mconnor)
We'll need to figure out what to do with options.xul too..

Oh and preferences.
Comment on attachment 451367 [details] [diff] [review]
v1 appversion

Can you make these values definable in the Makefile?  I suspect we'll need to update this version at least once.
Attachment #451367 - Flags: review?(mconnor) → review-
Attachment #451362 - Flags: review?(mconnor) → review+
Attached patch v2 appversion (obsolete) — Splinter Review
More subst magic!
Attachment #451367 - Attachment is obsolete: true
Attachment #451381 - Flags: review?(mconnor)
Attached patch v2 appversionSplinter Review
Attachment #451381 - Attachment is obsolete: true
Attachment #451382 - Flags: review?(mconnor)
Attachment #451381 - Flags: review?(mconnor)
Attachment #451382 - Flags: review?(mconnor) → review+
how to test this against client?   just make sure they both still work at a smoketest level when both are running?
Well, there won't be "both" so much, but yes.  Duplicate UI, etc, is bad, broken sync is bad.  For Fennec, UI + add-on UI in prefs would be bad, etc.
Attachment #451646 - Flags: review?(mconnor)
Comment on attachment 451646 [details] [diff] [review]
v1 prefs migration


>+  _migratePrefs: function _migratePrefs() {
>+    // No need to re-migrate
>+    if (Svc.Prefs.get("migrated", false))
>+      return;
>+
>+    // Grab the list of old pref names
>+    let oldPrefBranch = "extensions.weave.";
>+    let oldPrefNames = Cc["@mozilla.org/preferences-service;1"].
>+                       getService(Ci.nsIPrefService).
>+                       getBranch(oldPrefBranch).
>+                       getChildList("", {});
>+
>+    // Map each old pref to the current pref branch
>+    let oldPref = new Preferences(oldPrefBranch);
>+    for each (let pref in oldPrefNames)
>+      Svc.Prefs.set(pref, oldPref.get(pref));
>+
>+    // Remove all the old prefs and remember that we've migrated
>+    oldPref.reset(oldPrefNames);

don't do this, call resetBranch on oldPrefBranch (just need to cache the branch you get earlier, and reuse here).

otherwise, r+
Attachment #451646 - Flags: review?(mconnor) → review+
Blocks: 572536
http://hg.mozilla.org/services/fx-sync/rev/5b7eb60105d3
Map the modules directory to services-sync instead of weave and update imports. 

http://hg.mozilla.org/services/fx-sync/rev/e32234bb73b7Only overlay Firefox before 3.7b1pre and Fennec before 2.0b1pre using @subst@. 

http://hg.mozilla.org/services/fx-sync/rev/f78c411eefac
Migrate prefs from extensions.weave. to services.sync. when loading the service for the first time before migration.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Blocks: 573164
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: