Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2271)

Unified Diff: chrome/browser/sync/glue/bookmark_change_processor.cc

Issue 6931018: Initial implementation of "Synced Bookmarks" folder. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merge Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/bookmark_change_processor.cc
diff --git a/chrome/browser/sync/glue/bookmark_change_processor.cc b/chrome/browser/sync/glue/bookmark_change_processor.cc
index a82291b4847a25980372ee3c53e0dfd346f759ba..8d61778e469698f5f8ca23b168874f741550dc89 100644
--- a/chrome/browser/sync/glue/bookmark_change_processor.cc
+++ b/chrome/browser/sync/glue/bookmark_change_processor.cc
@@ -191,7 +191,8 @@ void BookmarkChangeProcessor::BookmarkNodeChanged(BookmarkModel* model,
const BookmarkNode* node) {
DCHECK(running());
// We shouldn't see changes to the top-level nodes.
- if (node == model->GetBookmarkBarNode() || node == model->other_node()) {
+ if (node == model->GetBookmarkBarNode() || node == model->other_node() ||
+ node == model->synced_node()) {
NOTREACHED() << "Saw update to permanent node!";
return;
}
@@ -225,7 +226,8 @@ void BookmarkChangeProcessor::BookmarkNodeMoved(BookmarkModel* model,
DCHECK(running());
const BookmarkNode* child = new_parent->GetChild(new_index);
// We shouldn't see changes to the top-level nodes.
- if (child == model->GetBookmarkBarNode() || child == model->other_node()) {
+ if (child == model->GetBookmarkBarNode() || child == model->other_node() ||
+ child == model->synced_node()) {
NOTREACHED() << "Saw update to permanent node!";
return;
}
@@ -384,7 +386,8 @@ void BookmarkChangeProcessor::ApplyChangesFromSyncModel(
model_associator_->GetChromeNodeFromSyncId(changes[i].id);
// Ignore changes to the permanent top-level nodes. We only care about
// their children.
- if ((dst == model->GetBookmarkBarNode()) || (dst == model->other_node()))
+ if ((dst == model->GetBookmarkBarNode()) || (dst==model->other_node()) ||
+ (dst == model->synced_node()))
continue;
if (changes[i].action ==
sync_api::SyncManager::ChangeRecord::ACTION_DELETE) {
« no previous file with comments | « chrome/browser/sync/engine/download_updates_command.cc ('k') | chrome/browser/sync/glue/bookmark_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698