The externs for chrome.bookmarkManagerPrivate[1] were generated 3 years ago, and edited by hand since then. We should be generating these with json_schema_compiler. Otherwise, we have to make manual changes any time the API changes (and we don't always do that, or do it correctly, because we're human).
Blockers:
* Issue 543822 will crop up in the generated externs, since this API references chrome.bookmarks. We could manually replace chrome.bookmarkManagerPrivate.bookmarks with chrome.bookmarks until that issue is resolved, using bluetooth_private.js as an example. (It's a little trickier since chrome.bookmarkManagerPrivate.bookmarks.BookmarkTreeNode will have to be replaced with only BookmarkTreeNode.[2])
* Issue 717827 also occurs, and could also be resolved manually.
* The compiler and the externs generator have changed over the years. A couple (literally two) compiler errors in bookmark_manager JS will need to be fixed, as well as an error in bookmark_manager_private.json, but that's WAI as far as compiling is concerned!
[1] https://cs.chromium.org/chromium/src/third_party/closure_compiler/externs/bookmark_manager_private.js?type=cs&sq=package:chromium
[2] bookmark_manager also uses the externs at chrome_extensions.js, which come from the closure compiler itself. We should instead generate the externs we need, especially for the chrome.bookmarks API (e.g., generate bookmarks.js). Again, we'll have to update our code to conform to the new externs.
Comment 1 by michae...@chromium.org
, May 3 2017