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

Unified Diff: chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.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/extensions/api/bookmarks/bookmark_api_helpers.cc
diff --git a/chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.cc b/chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.cc
index 6c9fb4a731c01ed2b7b9eb2d25792bb637e7aa91..4e0fa043cdadc40959c5a6a818bd9b124cc40a58 100644
--- a/chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.cc
+++ b/chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.cc
@@ -136,8 +136,7 @@ bool RemoveNode(BookmarkModel* model,
return false;
}
- const BookmarkNode* parent = node->parent();
- model->Remove(parent, parent->GetIndexOf(node));
+ model->Remove(node);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698