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

Unified Diff: chrome/browser/history/android/bookmark_model_sql_handler.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/history/android/bookmark_model_sql_handler.cc
diff --git a/chrome/browser/history/android/bookmark_model_sql_handler.cc b/chrome/browser/history/android/bookmark_model_sql_handler.cc
index 3c9e5e275be232c4f83f3d90d75cf4eab9323f44..73fb8d88b4c35b4666e55b4d70f562f06e6601f5 100644
--- a/chrome/browser/history/android/bookmark_model_sql_handler.cc
+++ b/chrome/browser/history/android/bookmark_model_sql_handler.cc
@@ -61,8 +61,7 @@ void BookmarkModelSQLHandler::Task::RemoveBookmark(const GURL& url) {
bookmark_model->GetNodesByURL(url, &nodes);
for (std::vector<const BookmarkNode*>::iterator i = nodes.begin();
i != nodes.end(); ++i) {
- const BookmarkNode* parent_node = (*i)->parent();
- bookmark_model->Remove(parent_node, parent_node->GetIndexOf(*i));
+ bookmark_model->Remove(*i);
}
}
« no previous file with comments | « chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.cc ('k') | chrome/browser/sync/glue/bookmark_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698