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

Unified Diff: components/bookmarks/managed/managed_bookmarks_tracker.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: components/bookmarks/managed/managed_bookmarks_tracker.cc
diff --git a/components/bookmarks/managed/managed_bookmarks_tracker.cc b/components/bookmarks/managed/managed_bookmarks_tracker.cc
index 5dd1accd1cb180b796b7e6bf48a5111a780b14b1..17eff02f91d22c33cb50633a4e3205140ef594ab 100644
--- a/components/bookmarks/managed/managed_bookmarks_tracker.cc
+++ b/components/bookmarks/managed/managed_bookmarks_tracker.cc
@@ -172,7 +172,7 @@ void ManagedBookmarksTracker::UpdateBookmarks(const BookmarkNode* folder,
// Remove any extra children of |folder| that haven't been reused.
while (folder->child_count() != folder_index)
- model_->Remove(folder, folder_index);
+ model_->Remove(folder->GetChild(folder_index));
}
// static
« no previous file with comments | « components/bookmarks/browser/bookmark_utils.cc ('k') | components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698