Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 18 users
Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature



Sign in to add a comment
Add constants to bookmarks extension API for well-known folders
Project Member Reported by aa@chromium.org, Sep 9 2009 Back to list
There is no good way to find folders such as "Other Bookmarks" or "Bookmarks 
Bar" in the bookmarks API. We should add some constants to the API that 
contain special IDs for these folders.
 
Comment 1 by aa@chromium.org, Nov 16 2009
Labels: Feature-Extensions
Comment 2 by aa@chromium.org, Nov 19 2009
Labels: -Area-Extensions
Comment 3 by co...@xmarks.com, Jan 12 2010
Is this bug being considered part of the internationalization push?  I was excited to 
see the latest beta channel include i18n support, but our extension can't support non-
English versions of Chrome until we can reliably access the "Other bookmarks" and 
"Bookmarks bar" folders in those languages.  (I supposed we could just assume that the 
first child of the root folder is the bookmarks bar and the second is the other 
bookmarks folder, but that sounds like a dangerous assumption to make.)
I think this is a reasonably safe way to do it.  Another reasonably safe way is to rely 
on ids "1" and "2".  "0" (root node), "1" and "2" will be reserved going forward.

Comment 5 by bleck...@gmail.com, Jan 13 2010
As far as I can tell, the "Other bookmarks" folder's id is currently "5" on my
machine.  "0" and "1" hold true for the root and Boomarks bar.  Not sure if this is
because my bookmarks were originally created back before persistent bookmark ids or not.
That's not good.  Thanks for the info.
+munjal, sky in case either of them have an idea how this could have happened.

I guess your order idea is the better one then.
Comment 7 by munjal@chromium.org, Jan 13 2010
That's because hte decoder would've assigned IDs in roughtly DFS order when it 
transitioned all bookmarks from not having IDs to having IDs. So if there are bookmarks 
under bookmarks bar node, then other bookmarks would get an ID greater than IDs of all 
children of bookmarks bar.

It's better to expose special APIs to access these permanent nodes; like bookmark model 
has GetBookmarksBarNode and other_node.

That's unfortunate.  I didn't notice that in reviewing the migration code.  That means 
that ids vary when they didn't have to (we could have migrated breadth-first).  The 
especially bad thing is that almost all users will be the same.  It's only the users 
who went through the migration that will vary, which makes odd bugs more likely.

While I agree that from an API standpoint, it's better to have special APIs to access 
these node, we didn't get to it for 4.0, so people will find workarounds. :(
Comment 9 by munjal@chromium.org, Jan 13 2010
At the time when we did this, we didn't have an explicit goal to make sure that IDs for 
bookmark bar and other bookmarks remain some fixed values. So it was easy from code 
perspective to do this. Plus, DFS already existed in decoding and we just added code to 
handle ID assignment to it; that was also natural to do in the absence of the goal of 
fixed IDs.

Comment 10 by sky@chromium.org, Jan 13 2010
BookmarkModel::is_permanent_node tells you if a node is permanent.
Status: Available
Labels: Area-Feature
Labels: -Area-Feature Area-UI
Comment 14 by aa@chromium.org, Sep 10 2010
Labels: Pri-2
Comment 15 by aa@chromium.org, Sep 10 2010
Labels: Mstone-X
Labels: -mstone-x
Project Member Comment 17 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Feature-Extensions -Area-UI Cr-Platform-Extensions Cr-UI
Project Member Comment 18 by sheriffbot@chromium.org, Jun 28 2016
Labels: Hotlist-Recharge-Cold
Status: Untriaged
This issue has been available for more than 365 days, and should be re-evaluated. Hotlist-Recharge-Cold label is added for tracking. Please re-triage this issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Sign in to add a comment