Closed
Bug 648364
Opened 14 years ago
Closed 14 years ago
Replace custom helpers with Services.jsm, NetUtil.jsm, FileUtils.jsm, PlacesUtils.jsm equivalents
Categories
(Firefox :: Sync, defect)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
mozilla6
People
(Reporter: philikon, Assigned: philikon)
References
Details
(Whiteboard: [prune][qa-])
Attachments
(7 files, 3 obsolete files)
(deleted),
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
philikon
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•14 years ago
|
Summary: Replace custom helpers with Services.jsm, NetUtil.jsm, FileUtils.jsm equivalents → Replace custom helpers with Services.jsm, NetUtil.jsm, FileUtils.jsm, PlacesUtils.jsm equivalents
Comment 1•14 years ago
|
||
CCing Jen. This is the remainder of the compat code removal work.
Assignee | ||
Comment 2•14 years ago
|
||
Assignee | ||
Comment 3•14 years ago
|
||
Attachment #533496 -
Flags: review?(rnewman)
Assignee | ||
Comment 4•14 years ago
|
||
Attachment #533497 -
Flags: review?(rnewman)
Comment 5•14 years ago
|
||
Comment on attachment 533494 [details] [diff] [review]
Part 1 (v1): Services.jsm
Beautifully formulaic.
Two identical nits:
> + let logins = Services.logins.findLogins({}, login.hostname, login.formSubmitURL,
> login.httpRealm);
and
> + return Services.logins.QueryInterface(Ci.nsIInterfaceRequestor)
> .getInterface(Ci.mozIStorageConnection);
Indentation on the second line no longer matches the first line.
I will trust that it builds and tests pass: I am trying to avoid being labeled a masochist ;)
Attachment #533494 -
Flags: review?(rnewman) → review+
Assignee | ||
Comment 6•14 years ago
|
||
Address review comments
Attachment #533494 -
Attachment is obsolete: true
Assignee | ||
Comment 7•14 years ago
|
||
Rebase on top of Part 1 (v1.1)
Attachment #533497 -
Attachment is obsolete: true
Attachment #533497 -
Flags: review?(rnewman)
Attachment #533551 -
Flags: review?(rnewman)
Assignee | ||
Comment 8•14 years ago
|
||
Attachment #533562 -
Flags: review?(rnewman)
Assignee | ||
Comment 9•14 years ago
|
||
Attachment #533563 -
Flags: review?(rnewman)
Updated•14 years ago
|
Attachment #533550 -
Flags: review+
Comment 10•14 years ago
|
||
Comment on attachment 533496 [details] [diff] [review]
Part 2 (v1): PlacesUtils.jsm
+ let mRoot = PlacesUtils.bookmarks.createFolder(root, "mobile", -1);
+ PlacesUtils.annotations.setItemAnnotation(mRoot, MOBILEROOT_ANNO, 1, 0,
+ PlacesUtils.annotations.EXPIRE_NEVER);
+ PlacesUtils.annotations.setItemAnnotation(mRoot, EXCLUDEBACKUP_ANNO, 1, 0,
+ PlacesUtils.annotations.EXPIRE_NEVER);
and
+ PlacesUtils.annotations.setItemAnnotation(itemId, DESCRIPTION_ANNO, val, 0,
+ PlacesUtils.annotations.EXPIRE_NEVER);
and
+ PlacesUtils.annotations.setItemAnnotation(itemId, SIDEBAR_ANNO, true, 0,
+ PlacesUtils.annotations.EXPIRE_NEVER);
and
+ PlacesUtils.annotations.setItemAnnotation(itemId, SMART_BOOKMARKS_ANNO, val, 0,
+ PlacesUtils.annotations.EXPIRE_NEVER);
... indentation. (Our style guide suggests that multi-line params should each get their own line, but I don't think it applies in this case! :D)
if (!parent)
- parent = Svc.Bookmark.getFolderIdForItem(itemid);
- Svc.Bookmark.moveItem(itemid, parent, idx - delta);
+ parent = PlacesUtils.bookmarks.getFolderIdForItem(itemid);
+ PlacesUtils.bookmarks.moveItem(itemid, parent, idx - delta);
While you're touching this part, can we get {} around the if consequent?
Otherwise, bravo!
Sidenote: I can't wait for standardization of anonymous function syntax.
Attachment #533496 -
Flags: review?(rnewman) → review+
Comment 11•14 years ago
|
||
Comment on attachment 533551 [details] [diff] [review]
Part 3 (v1.1): XPCOMUtils.jsm
http://etler.com/clapping-b.gif
Attachment #533551 -
Flags: review?(rnewman) → review+
Comment 12•14 years ago
|
||
Comment on attachment 533562 [details] [diff] [review]
Part 4 (v1): FileUtils.jsm
http://etler.com/applause.gif
Attachment #533562 -
Flags: review?(rnewman) → review+
Updated•14 years ago
|
Attachment #533563 -
Flags: review?(rnewman) → review+
Assignee | ||
Comment 13•14 years ago
|
||
Addressed rnewman's review comments
Attachment #533496 -
Attachment is obsolete: true
Updated•14 years ago
|
Attachment #533748 -
Flags: review+
Assignee | ||
Comment 14•14 years ago
|
||
Part 1: http://hg.mozilla.org/services/services-central/rev/a839caa0357b
Part 2: http://hg.mozilla.org/services/services-central/rev/aa2c607672e1
Part 3: http://hg.mozilla.org/services/services-central/rev/94124bd1a596
Part 4: http://hg.mozilla.org/services/services-central/rev/6d296a1726a5
Part 5: http://hg.mozilla.org/services/services-central/rev/713b31e0cba9
Whiteboard: [prune] → [prune][fixed in services][qa-]
Assignee | ||
Comment 15•14 years ago
|
||
One last part: removing some (brain-)dead test helpers. Also make SyncTestingInfrastructure sane(r). Need to rethinking this for the long term, but in the short term this already so much better.
Attachment #534179 -
Flags: review?(rnewman)
Comment 16•14 years ago
|
||
Comment on attachment 534179 [details] [diff] [review]
Part 6 (v1): dead test code
Looks good to me! Interested to see all greens when you push this :D
Attachment #534179 -
Flags: review?(rnewman) → review+
Assignee | ||
Comment 17•14 years ago
|
||
Comment 18•14 years ago
|
||
Re
https://hg.mozilla.org/services/services-central/rev/2c2e81d7fc04
I believe there's a missing case here:
case "ProfD":
return ds.get("CurProcD", Ci.nsIFile);
Patch arriving momentarily.
Comment 19•14 years ago
|
||
Sorry for failing to spot this in review.
Attachment #534516 -
Flags: review?(philipp)
Assignee | ||
Updated•14 years ago
|
Attachment #534516 -
Flags: review?(philipp) → review+
Comment 20•14 years ago
|
||
Assignee | ||
Comment 21•14 years ago
|
||
Part 1: http://hg.mozilla.org/mozilla-central/rev/a839caa0357b
Part 2: http://hg.mozilla.org/mozilla-central/rev/aa2c607672e1
Part 3: http://hg.mozilla.org/mozilla-central/rev/94124bd1a596
Part 4: http://hg.mozilla.org/mozilla-central/rev/6d296a1726a5
Part 5: http://hg.mozilla.org/mozilla-central/rev/713b31e0cba9
Part 6: http://hg.mozilla.org/mozilla-central/rev/2c2e81d7fc04
Part 7: http://hg.mozilla.org/mozilla-central/rev/5d709f5dd2e2
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [prune][fixed in services][qa-] → [prune][qa-]
Target Milestone: --- → mozilla6
Updated•6 years ago
|
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.
Description
•