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

Unified Diff: components/undo/bookmark_undo_service.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/undo/bookmark_undo_service.cc
diff --git a/components/undo/bookmark_undo_service.cc b/components/undo/bookmark_undo_service.cc
index 695bacb91a18d9ad354b81b53bf5ccf503c81639..21a34119ace45434643fc7134a78f74b42aa64c4 100644
--- a/components/undo/bookmark_undo_service.cc
+++ b/components/undo/bookmark_undo_service.cc
@@ -84,7 +84,7 @@ void BookmarkAddOperation::Undo() {
bookmarks::GetBookmarkNodeByID(model, parent_id_);
DCHECK(parent);
- model->Remove(parent, index_);
+ model->Remove(parent->GetChild(index_));
}
int BookmarkAddOperation::GetUndoLabelId() const {

Powered by Google App Engine
This is Rietveld 408576698