Permanent folders changes

This cl removes the non visible bookmark folders from the recently modified folder list. When sync is turned off some folders may become invisible. If this non visible folder was the last one used to create a bookmark you may end up in the situation where you can bookmark in a folder you can't see. This avoid the situation.

This cl also changes the way BookmarkNode::IsVisible() is implemented. A subsequent cl will introduce new features in there but in order to do so the Bookmark node needs to have access to the state of the sync, itself stored in the profile. I've tried a couple of approaches before settling down on this one:

- Passing the profile as argument to IsVisible().
- moving IsVisible as BookmarkModel::IsNodeVisible(BookmarkNode*) as the BookmarkModel has a profile_ instance variable.

Both those approaches required to change the calls to IsVisible all over the place and there are quite a bit of them, mostly in platform specific code. I've tried them, but they end up creating very big CL with changes in most of the platform code, with code made ugly because there are more arguments everywhere.

The simpler solution I've settled on introduces a small subclass of BookmarkNode, used only for the 3 permanent nodes ("Bookmark Bar", "Synced" and "Other"). That class get a profile on creation, and can then implement the visibility required by the feature in development.

This cl also includes a small improvement in the way the order of permanent folders is encoded. Two places in the code where enforcing the same order. I made the order of the permanent folders in the child array of the bookmark root the canonical order. The other place now explicitly uses this order.


Review URL: http://codereview.chromium.org/8273041

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106058 0039d316-1c4b-4281-b951-d872f2087c98
5 files changed