Closed Bug 857429 Opened 12 years ago Closed 12 years ago

Remove and deprecate methods in PlacesUtils.backups, depending on add-on usage

Categories

(Toolkit :: Places, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: raymondlee, Assigned: raymondlee)

References

Details

Attachments

(1 file, 3 obsolete files)

Bug 855638 would handle calls within mozilla-central. This bug is to remove PlacesUtils.backups and deprecate methods which depends on add-on usage.
Here are the addons using PlacesUtils.backups. https://addons.mozilla.org/en-US/firefox/addon/stumbleupon/?src=search /138/content/stumbleuponOverlay.js line 3298 -- if(PlacesUtils && PlacesUtils.backups) line 3301 -- name = PlacesUtils.backups.getFilenameForDate(); https://addons.mozilla.org/en-US/thunderbird/addon/wat-webapplicationtab/?src=search /55713/chrome/content/places/places.js line 409 -- let backupFiles = PlacesUtils.backups.entries; line 415 -- let backupDate = PlacesUtils.backups.getDateForFile(backupFiles[i]); line 439 -- let backupFiles = PlacesUtils.backups.entries; line 521 -- fp.defaultString = PlacesUtils.backups.getFilenameForDate(); line 524 -- PlacesUtils.backups.saveBookmarksToJSONFile(fp.file); https://addons.mozilla.org/en-US/firefox/addon/bookmark-favicon-changer/?src=search /300259/chrome/content/module.jsm line 136 -- // Hook function PlacesUtils.backups.saveBookmarksToJSONFile in PlacesUtils.jsm for embeding favicon data into JSON file line 139 -- this.saveBookmarksToJSONFile = PlacesUtils.backups.saveBookmarksToJSONFile; line 140 -- PlacesUtils.backups.saveBookmarksToJSONFile = function()
Depends on: 855638
Depends on: 859151
Blocks: 854761
Blocks: 855218
Assignee: nobody → raymond
Attached patch v1 (obsolete) — Splinter Review
This patch depends on the patch for bug 855638.
Attachment #737846 - Flags: review?(mak77)
I think there's a simpler solution, that is to make PlacesUtils.backups a getter (with a Deprecated.warning stating PlacesUtils.backups is deprecated) returning PlacesBackups
Attachment #737846 - Flags: review?(mak77)
Attached patch v2 (obsolete) — Splinter Review
Attachment #737846 - Attachment is obsolete: true
Attachment #738554 - Flags: review?(mak77)
Comment on attachment 738554 [details] [diff] [review] v2 Review of attachment 738554 [details] [diff] [review]: ----------------------------------------------------------------- Thanks ::: toolkit/components/places/PlacesUtils.jsm @@ +1749,5 @@ > * Helper to create and manage backups. > */ > + get backups() { > + Deprecated.warning( > + "backups is deprecated and will be removed in a future version", I'd say "PlacesUtils.backups", otherwise just "backups" is too generic
Attachment #738554 - Flags: review?(mak77) → review+
Attached patch Patch for check-in (obsolete) — Splinter Review
(In reply to Marco Bonardo [:mak] from comment #5) > Comment on attachment 738554 [details] [diff] [review] > v2 > > Review of attachment 738554 [details] [diff] [review]: > ----------------------------------------------------------------- > > Thanks > > ::: toolkit/components/places/PlacesUtils.jsm > @@ +1749,5 @@ > > * Helper to create and manage backups. > > */ > > + get backups() { > > + Deprecated.warning( > > + "backups is deprecated and will be removed in a future version", > > I'd say "PlacesUtils.backups", otherwise just "backups" is too generic Updated Passed try https://tbpl.mozilla.org/?tree=Try&rev=d561a0a922c7
Attachment #738554 - Attachment is obsolete: true
Attachment #739381 - Attachment is obsolete: true
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: