Closed
Bug 967192
Opened 11 years ago
Closed 11 years ago
Bookmarks restore and import should use OS.File
Categories
(Toolkit :: Places, defect)
Toolkit
Places
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: mak, Assigned: mak)
References
Details
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
asaf
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
asaf
:
review+
|
Details | Diff | Splinter Review |
we should deprecate any nsIFile usage in import/export code
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•11 years ago
|
||
while here I'd like to kill BookmarkHTMLUTils.importJSONNode that is only needed by 1 test.
I'll also file a bug to remove the deprecated stuff from PlacesUtils.
Assignee | ||
Comment 2•11 years ago
|
||
to remove importJSONNode, I need to figure the whole reasoning behind resolveShortcuts (in wrapNode). I honestly don't see any case where we may want to convert a simple place: query to a deep copy of its contents. My understanding is that originally we made it to protect roots from being moved to other locations, though now:
- roots are protected in the backend, nobody can remove or move them (just in case)
- we support proper "copy" actions when the parent is readonly
- we can also double check just before moving the item if it can really be moved otherwise fallback to a copy.
Basically, I think resolveShortcuts is a bunch of useless code today, though to remove it I basically have to fix bug 435851. Not that it's a bad idea, it will just some more hours of work.
I want to simply make shortcuts being dragged as shortcuts, remove resolveShortcuts, remove test_423515_forceCopyShortcuts.js and finally I should be able to remove the importJSONNode method, and maybe something more.
Assignee | ||
Comment 3•11 years ago
|
||
the patch in bug 435851 solves comment 2, so I can now proceed with the other APIs
Assignee | ||
Updated•11 years ago
|
Blocks: 818399
Summary: Bookmarks import should use OS.File → Bookmarks restore and import should use OS.File
Updated•11 years ago
|
Blocks: fxdesktopbacklog
Whiteboard: p=0
Assignee | ||
Comment 4•11 years ago
|
||
I will attach a separate patch for tests
Attachment #8377273 -
Flags: review?(mano)
Assignee | ||
Comment 5•11 years ago
|
||
forgot one rethrow
Attachment #8377273 -
Attachment is obsolete: true
Attachment #8377273 -
Flags: review?(mano)
Attachment #8377274 -
Flags: review?(mano)
Assignee | ||
Comment 6•11 years ago
|
||
this is just "automatic" conversion of tests, nothing interesting to see
Attachment #8377525 -
Flags: review?(mano)
Comment 7•11 years ago
|
||
Comment on attachment 8377274 [details] [diff] [review]
patch v1.1
Review of attachment 8377274 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/components/places/BookmarkHTMLUtils.jsm
@@ +133,5 @@
> this.BookmarkHTMLUtils = Object.freeze({
> /**
> * Loads the current bookmarks hierarchy from a "bookmarks.html" file.
> *
> + * @param aUrl
I prefer aUrlString over aUrl for a spec, but, of course, aURLSpec or aSpec is better.
@@ +163,5 @@
> /**
> * Loads the current bookmarks hierarchy from a "bookmarks.html" file.
> *
> + * @param aFilePath
> + * OS.File path of the "bookmarks.html" file to be loaded.
As I said for the other patch,, I wouldn't mention "OS.File path" as if it is something different from a plain string.
::: toolkit/components/places/BookmarkJSONUtils.jsm
@@ +58,5 @@
> * @note any item annotated with "places/excludeFromBackup" won't be removed
> * before executing the restore.
> *
> * @param aFilePath
> + * OS.File path of bookmarks in JSON format to be restored.
Ditto.
Attachment #8377274 -
Flags: review?(mano) → review+
Updated•11 years ago
|
Attachment #8377525 -
Flags: review?(mano) → review+
Assignee | ||
Comment 8•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f0cf7cdc0301
https://hg.mozilla.org/integration/mozilla-inbound/rev/6a294c3292c3
Target Milestone: --- → mozilla30
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f0cf7cdc0301
https://hg.mozilla.org/mozilla-central/rev/6a294c3292c3
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
No longer blocks: fxdesktopbacklog
Whiteboard: p=0
You need to log in
before you can comment on or make changes to this bug.
Description
•