diff options
author | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-19 19:26:24 +0000 |
---|---|---|
committer | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-19 19:26:24 +0000 |
commit | 3e497007ba8c68ec5b93caae053c6fbce24cb7e9 (patch) | |
tree | 15af63f942a917927934706d41bbfcd71f46d671 /chrome | |
parent | 2a3a7764dc3343682a888f194c59b9ad48729e4b (diff) | |
download | chromium_src-3e497007ba8c68ec5b93caae053c6fbce24cb7e9.zip chromium_src-3e497007ba8c68ec5b93caae053c6fbce24cb7e9.tar.gz chromium_src-3e497007ba8c68ec5b93caae053c6fbce24cb7e9.tar.bz2 |
Beef-up a DCHECK_NE case in browser_sync::ChangeProcessor to return early if one of the permanent nodes are changed by a bookmark model event. I think we may hit a roadblock a bit deeper down right now and not actually poison the user's cloud state, but it seems best to
catch this at first-chance.
BUG=25067
Review URL: http://codereview.chromium.org/295007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29437 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/sync/glue/change_processor.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/browser/sync/glue/change_processor.cc b/chrome/browser/sync/glue/change_processor.cc index d90560f..ccc65043 100644 --- a/chrome/browser/sync/glue/change_processor.cc +++ b/chrome/browser/sync/glue/change_processor.cc @@ -179,8 +179,10 @@ void ChangeProcessor::BookmarkNodeChanged(BookmarkModel* model, const BookmarkNode* node) { DCHECK(running_); // We shouldn't see changes to the top-level nodes. - DCHECK_NE(node, model->GetBookmarkBarNode()); - DCHECK_NE(node, model->other_node()); + if (node == model->GetBookmarkBarNode() || node == model->other_node()) { + NOTREACHED() << "Saw update to permanent node!"; + return; + } // Acquire a scoped write lock via a transaction. sync_api::WriteTransaction trans(share_handle_); @@ -213,8 +215,10 @@ void ChangeProcessor::BookmarkNodeMoved(BookmarkModel* model, DCHECK(running_); const BookmarkNode* child = new_parent->GetChild(new_index); // We shouldn't see changes to the top-level nodes. - DCHECK_NE(child, model->GetBookmarkBarNode()); - DCHECK_NE(child, model->other_node()); + if (child == model->GetBookmarkBarNode() || child == model->other_node()) { + NOTREACHED() << "Saw update to permanent node!"; + return; + } // Acquire a scoped write lock via a transaction. sync_api::WriteTransaction trans(share_handle_); |