summaryrefslogtreecommitdiff
path: root/chromium/components/sync_bookmarks/synced_bookmark_tracker.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-08-30 10:22:43 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-08-30 12:36:28 +0000
commit271a6c3487a14599023a9106329505597638d793 (patch)
treee040d58ffc86c1480b79ca8528020ca9ec919bf8 /chromium/components/sync_bookmarks/synced_bookmark_tracker.cc
parent7b2ffa587235a47d4094787d72f38102089f402a (diff)
downloadqtwebengine-chromium-271a6c3487a14599023a9106329505597638d793.tar.gz
BASELINE: Update Chromium to 77.0.3865.59
Change-Id: I1e89a5f3b009a9519a6705102ad65c92fe736f21 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/components/sync_bookmarks/synced_bookmark_tracker.cc')
-rw-r--r--chromium/components/sync_bookmarks/synced_bookmark_tracker.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/chromium/components/sync_bookmarks/synced_bookmark_tracker.cc b/chromium/components/sync_bookmarks/synced_bookmark_tracker.cc
index 40636dd05a5..5f3edc888f5 100644
--- a/chromium/components/sync_bookmarks/synced_bookmark_tracker.cc
+++ b/chromium/components/sync_bookmarks/synced_bookmark_tracker.cc
@@ -424,9 +424,8 @@ SyncedBookmarkTracker::ReorderUnsyncedEntitiesExceptDeletions(
// Remove those who are direct children of another node.
for (const SyncedBookmarkTracker::Entity* entity : entities) {
const bookmarks::BookmarkNode* node = entity->bookmark_node();
- for (int i = 0; i < node->child_count(); ++i) {
- nodes.erase(node->GetChild(i));
- }
+ for (const auto& child : node->children())
+ nodes.erase(child.get());
}
// |nodes| contains only roots of all trees in the forest all of which are
// ready to be processed because their parents have no pending updates.
@@ -446,10 +445,9 @@ void SyncedBookmarkTracker::TraverseAndAppend(
DCHECK(!entity->metadata()->is_deleted());
ordered_entities->push_back(entity);
// Recurse for all children.
- for (int i = 0; i < node->child_count(); ++i) {
- const bookmarks::BookmarkNode* child = node->GetChild(i);
+ for (const auto& child : node->children()) {
const SyncedBookmarkTracker::Entity* child_entity =
- GetEntityForBookmarkNode(child);
+ GetEntityForBookmarkNode(child.get());
DCHECK(child_entity);
if (!child_entity->IsUnsynced()) {
// If the entity has no local change, no need to check its children. If
@@ -464,7 +462,7 @@ void SyncedBookmarkTracker::TraverseAndAppend(
// added later.
continue;
}
- TraverseAndAppend(child, ordered_entities);
+ TraverseAndAppend(child.get(), ordered_entities);
}
}