Remove unnecessary dependencies from /components/sync and /browser_sync

Bug: 896303
Change-Id: Icf856bfa95640cbb44e75d35cc0e8514aac69e62
Reviewed-on: https://chromium-review.googlesource.com/c/1286850
Commit-Queue: Marc Treib <[email protected]>
Reviewed-by: Mikel Astiz <[email protected]>
Cr-Commit-Position: refs/heads/master@{#600739}
diff --git a/components/browser_sync/BUILD.gn b/components/browser_sync/BUILD.gn
index d7ea5aad..cf85756b 100644
--- a/components/browser_sync/BUILD.gn
+++ b/components/browser_sync/BUILD.gn
@@ -26,20 +26,15 @@
     "//base",
     "//components/autofill/core/browser",
     "//components/autofill/core/common",
-    "//components/dom_distiller/core",
     "//components/history/core/browser",
     "//components/invalidation/impl",
     "//components/invalidation/public",
-    "//components/keyed_service/core",
     "//components/password_manager/core/browser",
-    "//components/pref_registry",
     "//components/prefs",
     "//components/reading_list/features:flags",
     "//components/signin/core/browser",
     "//components/sync_bookmarks",
-    "//components/sync_preferences",
     "//components/sync_sessions",
-    "//components/variations",
     "//components/version_info",
     "//components/version_info:generate_version_info",
     "//google_apis",
@@ -66,12 +61,11 @@
     "//base",
     "//base/test:test_support",
     "//components/autofill/core/browser:test_support",
-    "//components/autofill/core/common:common",
-    "//components/bookmarks/browser:browser",
-    "//components/bookmarks/managed:managed",
-    "//components/bookmarks/test:test",
-    "//components/dom_distiller/core",
-    "//components/history/core/browser:browser",
+    "//components/autofill/core/common",
+    "//components/bookmarks/browser",
+    "//components/bookmarks/managed",
+    "//components/bookmarks/test",
+    "//components/history/core/browser",
     "//components/invalidation/impl",
     "//components/invalidation/public",
     "//components/prefs",
@@ -81,7 +75,7 @@
     "//components/sync:test_support_driver",
     "//components/sync:test_support_engine",
     "//components/sync:test_support_model",
-    "//components/sync_bookmarks:sync_bookmarks",
+    "//components/sync_bookmarks",
     "//components/sync_preferences",
     "//components/sync_preferences:test_support",
     "//components/sync_sessions",
@@ -118,12 +112,12 @@
     ":browser_sync",
     "//base",
     "//base/test:test_support",
-    "//components/bookmarks/browser:browser",
-    "//components/history/core/browser:browser",
+    "//components/bookmarks/browser",
+    "//components/history/core/browser",
     "//components/invalidation/impl",
     "//components/invalidation/impl:test_support",
     "//components/pref_registry",
-    "//components/signin/core/browser:browser",
+    "//components/signin/core/browser",
     "//components/signin/core/browser:test_support",
     "//components/sync",
     "//components/sync:test_support_driver",
diff --git a/components/browser_sync/DEPS b/components/browser_sync/DEPS
index 796a490..3067617 100644
--- a/components/browser_sync/DEPS
+++ b/components/browser_sync/DEPS
@@ -3,7 +3,6 @@
   "+components/bookmarks/browser",
   "+components/bookmarks/managed",
   "+components/bookmarks/test",
-  "+components/dom_distiller/core",
   "+components/history/core/browser",
   "+components/invalidation",
   "+components/keyed_service/core",
@@ -13,10 +12,9 @@
   "+components/reading_list/features",
   "+components/signin/core/browser",
   "+components/sync",
-  "+components/sync_preferences",
   "+components/sync_bookmarks",
+  "+components/sync_preferences",
   "+components/sync_sessions",
-  "+components/variations",
   "+components/version_info",
   "+components/webdata/common",
   "+components/webdata_services",
diff --git a/components/browser_sync/profile_sync_components_factory_impl.cc b/components/browser_sync/profile_sync_components_factory_impl.cc
index 8ecda1ec..607ec92 100644
--- a/components/browser_sync/profile_sync_components_factory_impl.cc
+++ b/components/browser_sync/profile_sync_components_factory_impl.cc
@@ -20,7 +20,6 @@
 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
 #include "components/browser_sync/browser_sync_switches.h"
 #include "components/browser_sync/profile_sync_service.h"
-#include "components/dom_distiller/core/dom_distiller_features.h"
 #include "components/history/core/browser/sync/history_delete_directives_data_type_controller.h"
 #include "components/history/core/browser/sync/history_delete_directives_model_type_controller.h"
 #include "components/history/core/browser/sync/typed_url_model_type_controller.h"
diff --git a/components/browser_sync/profile_sync_service.cc b/components/browser_sync/profile_sync_service.cc
index 6afec2e..85f8b60 100644
--- a/components/browser_sync/profile_sync_service.cc
+++ b/components/browser_sync/profile_sync_service.cc
@@ -21,7 +21,7 @@
 #include "components/browser_sync/sync_auth_manager.h"
 #include "components/invalidation/impl/invalidation_prefs.h"
 #include "components/invalidation/public/invalidation_service.h"
-#include "components/pref_registry/pref_registry_syncable.h"
+#include "components/prefs/pref_service.h"
 #include "components/reading_list/features/reading_list_buildflags.h"
 #include "components/signin/core/browser/account_info.h"
 #include "components/signin/core/browser/signin_metrics.h"
@@ -58,7 +58,6 @@
 #include "components/sync/model_impl/client_tag_based_model_type_processor.h"
 #include "components/sync/syncable/directory.h"
 #include "components/sync/syncable/syncable_read_transaction.h"
-#include "components/sync_preferences/pref_service_syncable.h"
 #include "components/sync_sessions/session_sync_service.h"
 #include "components/version_info/version_info_values.h"
 #include "services/identity/public/cpp/identity_manager.h"
diff --git a/components/sync/BUILD.gn b/components/sync/BUILD.gn
index fb84282..6933bc8 100644
--- a/components/sync/BUILD.gn
+++ b/components/sync/BUILD.gn
@@ -567,7 +567,6 @@
   ]
   deps = [
     "//base:i18n",
-    "//base/third_party/dynamic_annotations",
     "//components/data_use_measurement/core",
     "//components/invalidation/public",
     "//components/keyed_service/core",
@@ -577,7 +576,6 @@
     "//components/prefs",
     "//components/reading_list/features:reading_list_buildflags",
     "//components/signin/core/browser",
-    "//components/strings",
     "//components/variations",
     "//components/version_info",
     "//crypto",
diff --git a/components/sync/DEPS b/components/sync/DEPS
index 1027469..74b71ff4 100644
--- a/components/sync/DEPS
+++ b/components/sync/DEPS
@@ -6,7 +6,6 @@
   # to test.
   "+base",
   "+build",
-  "+components/strings",
   "+components/version_info",
   "+google_apis",
   "+testing",
diff --git a/components/sync/driver/DEPS b/components/sync/driver/DEPS
index 64c7a38..825422f1 100644
--- a/components/sync/driver/DEPS
+++ b/components/sync/driver/DEPS
@@ -4,7 +4,6 @@
   "+components/keyed_service/core",
   "+components/os_crypt",
   "+components/policy",
-  "+components/pref_registry",
   "+components/prefs",
   "+components/signin/core/browser",
   "+components/sync/base",