Fix permanent bookmark nodes being deleted
Deleting permanent folders is not handled well and violates an existing DCHECK in BookmarkModel::RemoveNodeFromIndexRecursive(), but no layer enforces this precondition for an API that is exposed to extensions (and possibly other callers). The patch now adds a DCHECK in BookmarkModel::Remove() to explicitly make it a precondition violation, and updates the extensions codepath to prevent such case. Specifically, one side effect is that prior to this patch observers were notified for OnWillRemoveBookmarks(), which could explain the sync-related CHECK failures in the linked bug. Bug: 1021829 Change-Id: Ia4f013258420c024c06e0d6ce54f5b1868cff62e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899374 Commit-Queue: Mikel Astiz <mastiz@chromium.org> Reviewed-by:Scott Violet <sky@chromium.org> Reviewed-by:
Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/master@{#713967}
Showing
Please register or sign in to comment