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

Unified Diff: chrome/browser/sync/test/integration/bookmarks_helper.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/test/integration/bookmarks_helper.cc
diff --git a/chrome/browser/sync/test/integration/bookmarks_helper.cc b/chrome/browser/sync/test/integration/bookmarks_helper.cc
index 4a5a6c6773f8ed681773f07512b91a4fbc90863c..64f69291bc605d5563b0fb9adf0faea83ca56961 100644
--- a/chrome/browser/sync/test/integration/bookmarks_helper.cc
+++ b/chrome/browser/sync/test/integration/bookmarks_helper.cc
@@ -631,9 +631,9 @@ void Remove(int profile, const BookmarkNode* parent, int index) {
const BookmarkNode* v_parent = NULL;
FindNodeInVerifier(model, parent, &v_parent);
ASSERT_TRUE(NodesMatch(parent->GetChild(index), v_parent->GetChild(index)));
- GetVerifierBookmarkModel()->Remove(v_parent, index);
+ GetVerifierBookmarkModel()->Remove(v_parent->GetChild(index));
}
- model->Remove(parent, index);
+ model->Remove(parent->GetChild(index));
}
void RemoveAll(int profile) {
@@ -642,7 +642,7 @@ void RemoveAll(int profile) {
for (int i = 0; i < root_node->child_count(); ++i) {
const BookmarkNode* permanent_node = root_node->GetChild(i);
for (int j = permanent_node->child_count() - 1; j >= 0; --j) {
- GetVerifierBookmarkModel()->Remove(permanent_node, j);
+ GetVerifierBookmarkModel()->Remove(permanent_node->GetChild(j));
}
}
}

Powered by Google App Engine
This is Rietveld 408576698