[sync] Add metrics to BookmarkModelMerger

There are still a number of unexplainable metrics, which suggest
many initial updates get ignored, without contributing to existing
metrics that represent error cases. To understand this better, this
patch adds a few additional metrics in BookmarkModelMerger.

Change-Id: If3e9644b79600ef4853755dae038e133622f3242
Bug: 1177798
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2880287
Commit-Queue: Mikel Astiz <[email protected]>
Reviewed-by: Ilya Sherman <[email protected]>
Reviewed-by: Rushan Suleymanov <[email protected]>
Cr-Commit-Position: refs/heads/master@{#882022}
diff --git a/components/sync_bookmarks/bookmark_model_merger.h b/components/sync_bookmarks/bookmark_model_merger.h
index 61d6bdb..08e5b2f 100644
--- a/components/sync_bookmarks/bookmark_model_merger.h
+++ b/components/sync_bookmarks/bookmark_model_merger.h
@@ -119,6 +119,11 @@
   // sends tombstones as part of the initial download.
   static RemoteForest BuildRemoteForest(syncer::UpdateResponseDataList updates);
 
+  // Recursively counts and returns the number of descendants for |node|,
+  // excluding |node| itself.
+  static int CountRemoteTreeNodeDescendantsForUma(
+      const BookmarkModelMerger::RemoteTreeNode& node);
+
   // Computes bookmark pairs that should be matched by GUID. Local bookmark
   // GUIDs may be regenerated for the case where they collide with a remote GUID
   // that is not compatible (e.g. folder vs non-folder).