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

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

Issue 1105413002: Avoid conversion of index to BookmarkNode pointer unnacessarily. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 years, 8 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_model_associator.cc
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.cc b/chrome/browser/sync/glue/bookmark_model_associator.cc
index 12d2635111d87cbbc2b763b277d91b509d5d7084..a49137d337499db5eda4d727af32b60d45f5353d 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.cc
+++ b/chrome/browser/sync/glue/bookmark_model_associator.cc
@@ -735,7 +735,7 @@ void BookmarkModelAssociator::ApplyDeletesFromSyncJournal(
folders_matched.push_back(
FolderInfo(child, parent, delete_entry.id));
} else {
- bookmark_model_->Remove(parent, child_index);
+ bookmark_model_->Remove(child);
context->IncrementLocalItemsDeleted();
}
// Move unmatched journal here and decrement counter.
@@ -755,7 +755,7 @@ void BookmarkModelAssociator::ApplyDeletesFromSyncJournal(
for (FolderInfoList::reverse_iterator it = folders_matched.rbegin();
it != folders_matched.rend(); ++it) {
if (it->folder->child_count() == 0) {
- bookmark_model_->Remove(it->parent, it->parent->GetIndexOf(it->folder));
+ bookmark_model_->Remove(it->folder);
context->IncrementLocalItemsDeleted();
} else {
// Keep non-empty folder and remove its journal so that it won't match
« no previous file with comments | « chrome/browser/sync/glue/bookmark_change_processor.cc ('k') | chrome/browser/sync/profile_sync_service_bookmark_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698