[sync] Implement local data query and migration for passwords

This implements helper class LocalDataQueryHelper to query local data
and LocalDataMigrationHelper to move all local data to account.

Bug: 1451508
Change-Id: Ic16b68d1f5f1590bef0de7b01816ce7eb9ee64a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4847412
Commit-Queue: Ankush Singh <[email protected]>
Auto-Submit: Ankush Singh <[email protected]>
Reviewed-by: David Benjamin <[email protected]>
Reviewed-by: Marc Treib <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1194014}
diff --git a/components/sync/service/local_data_description.cc b/components/sync/service/local_data_description.cc
index 92af727..c632c52 100644
--- a/components/sync/service/local_data_description.cc
+++ b/components/sync/service/local_data_description.cc
@@ -31,4 +31,15 @@
 
 LocalDataDescription::~LocalDataDescription() = default;
 
+bool operator==(const LocalDataDescription& lhs,
+                const LocalDataDescription& rhs) {
+  return lhs.type == rhs.type && lhs.item_count == rhs.item_count &&
+         lhs.domains == rhs.domains && lhs.domain_count == rhs.domain_count;
+}
+
+bool operator!=(const LocalDataDescription& lhs,
+                const LocalDataDescription& rhs) {
+  return !(lhs == rhs);
+}
+
 }  // namespace syncer