logic behind creating bookmark checksum in google chrome

google-chrome, google-chrome-extension

Solution

Regardless of the safety/hackishness of doing it, here's how:

- Make sure Chrome is closed.

- Delete (or rename) `Bookmarks.bak`

- Remove the checksum entry entirely from `Bookmarks`

- Edit the `Bookmarks` JSON to your hearts content

- Reopen Chrome

When presented with no backups and no checksum, Chrome will use the new JSON and generate a new checksum.

If you would like to do this more seamlessly / less aggressively, you can just look at how they generate the checksum in the original source code and implement the same algorithm (see here, on line 57).

Of course, keep in mind that Google can change things that could break compatibility. However, this does work, I just did it in a Java app I wrote.

Problem

How i can add a new bookmark entry in chrome bookmarkfile?. My requirement is, i need to add a bookmark entry through my application. Please specify the logic behind creating checksum(MD5).

Original source