Closed Bug 392213 Opened 17 years ago Closed 16 years ago

nsINavBookmarksService.idl comments need clarification for extension developers

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dietrich, Assigned: dietrich)

Details

Attachments

(1 file, 2 obsolete files)

>  * The comment for insertBookmark claims that "If this item already
> exists in the given folder, it will be moved to the new position." I
> hope this is left over from the earlier implementation and not an
> accurate reflection of how things work today.

> 
>  * getChildFolder claims to return the id of the folder within a
> specified parent folder given a name. I hope this isn't actually used
> anywhere, as it suggests that folder names need to be unique within a
> parent folder. Unless it serves some useful purpose, it should be pulled.

This was used when we used to attempt to merge Fx2 bookmarks imports into Places bookmarks. However, that process was unavoidably imprecise, so we dropped it in favor appending as is done in Fx2. This API is no longer used, and could be dropped.

http://mxr.mozilla.org/seamonkey/search?string=getchildfolder

> 
>  * If the comment for setItemIndex is correct -- namely, that the
> service doesn't take any responsibility for managing the integrity of
> the underlying data -- then I have to say I don't understand the role of
> this API. It's not really helpful to clients if a single inadvertently
> call can corrupt the datasource.

This was required to allow re-sorting from callers external to the service. Yes, we should have bigger warnings here.

We should also clarify the commentary on the get/set read-only apis, to indicate that they're for indicating whether something is read-only in the UI.
Assignee: nobody → dietrich
Attached patch update the comments (obsolete) — Splinter Review
Attachment #276681 - Flags: review?(thunder)
+   *  @returns void

ew!
(In reply to comment #2)
> +   *  @returns void
> 
> ew!
> 

are you attempting to say that you recommend not putting @returns if void?
   /**
    * Set a globally unique identifier.  This can be useful when a sync
    * algorithm deems two independently created items (on different
    * profiles) to be the same item.
    *  @param   aItemId
    *           The id of the item to set the GUID of
-   *  @returns The GUID string
+   *  @returns void
    */
   void setItemGUID(in long long aItemId, in AString aGUID);

What needs correction here is not the description of the return value, but the description of the aGUID arg: the function doesn't return a GUID; it takes one as an argument.

-Todd
(In reply to comment #4)
>    /**
>     * Set a globally unique identifier.  This can be useful when a sync
>     * algorithm deems two independently created items (on different
>     * profiles) to be the same item.
>     *  @param   aItemId
>     *           The id of the item to set the GUID of
> -   *  @returns The GUID string
> +   *  @returns void
>     */
>    void setItemGUID(in long long aItemId, in AString aGUID);
> 
> What needs correction here is not the description of the return value, but the
> description of the aGUID arg: the function doesn't return a GUID; it takes one
> as an argument.
> 
> -Todd
> 

ack, that'd certainly be the case.
Attached patch v2 (obsolete) — Splinter Review
Attachment #276681 - Attachment is obsolete: true
Attachment #276724 - Flags: review?(thunder)
Attachment #276681 - Flags: review?(thunder)
@patam aGUID
Attached patch v3Splinter Review
(In reply to comment #7)
> @patam aGUID
> 

s/t/r/

but i knew what you meant ;)

clearly a banner day.
Attachment #276724 - Attachment is obsolete: true
Attachment #276727 - Flags: review?(thunder)
Attachment #276724 - Flags: review?(thunder)
Comment on attachment 276727 [details] [diff] [review]
v3

Thanks, Dietrich!
Attachment #276727 - Flags: review?(thunder) → review+
Checking in toolkit/components/places/public/nsINavBookmarksService.idl;
/cvsroot/mozilla/toolkit/components/places/public/nsINavBookmarksService.idl,v  <--  nsINavBookmarksService.idl
new revision: 1.48; previous revision: 1.47
done
Status: NEW → ASSIGNED
hm, not sure why this is not marked fixed -> FIXED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: