[MVT Customization] Make CustomLinksManager available on Android.

In order for MostVisitedSites to use CustomLinksManager, the following
are needed:
1. CustomLinksManagerImpl needs to be registered PrefRegistry.
2. When instantiating MostVisitedSites, a CustomLinksManager instance
   needs to be passed.
3. MostVisitedSites::EnableCustomLinks() needs to be passed true.

This CL enables the above for Chrome on Android, subject to the feature
flag #most-visited-tiles-customization. Specifically:
* Do (1) on all platforms (previously skipped for Android).
* Do (2) subject to the flag in
  ChromeMostVisitedSitesFactory::NewForProfile().
* Do (3) subject to the flag in
  MostVisitedSitesBridge CTOR for JNI usage and in
  ChromeNTPTilesInternalsMessageHandlerClient::MakeMostVisitedSites()
  for chrome://ntp-tiles-internals page.

Bug: 397421743, 388782412
Change-Id: Idd4d1695848a3a2778f987144750ef3211e24f9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6442920
Reviewed-by: Theresa Sullivan <[email protected]>
Commit-Queue: Samuel Huang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1445440}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 24a341d..622b2341 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -128,6 +128,7 @@
 #include "components/metrics/demographics/user_demographics.h"
 #include "components/metrics/metrics_pref_names.h"
 #include "components/network_time/network_time_tracker.h"
+#include "components/ntp_tiles/custom_links_manager_impl.h"
 #include "components/ntp_tiles/most_visited_sites.h"
 #include "components/offline_pages/buildflags/buildflags.h"
 #include "components/omnibox/browser/document_provider.h"
@@ -312,7 +313,6 @@
 #include "components/lens/lens_overlay_permission_utils.h"
 #include "components/live_caption/live_caption_controller.h"
 #include "components/live_caption/live_translate_controller.h"
-#include "components/ntp_tiles/custom_links_manager_impl.h"
 #endif  // BUILDFLAG(IS_ANDROID)
 
 #if BUILDFLAG(ENABLE_DEVTOOLS_FRONTEND)
@@ -1892,6 +1892,7 @@
   metrics::RegisterDemographicsProfilePrefs(registry);
   NotificationDisplayServiceImpl::RegisterProfilePrefs(registry);
   NotifierStateTracker::RegisterProfilePrefs(registry);
+  ntp_tiles::CustomLinksManagerImpl::RegisterProfilePrefs(registry);
   ntp_tiles::MostVisitedSites::RegisterProfilePrefs(registry);
   optimization_guide::prefs::RegisterProfilePrefs(registry);
   optimization_guide::model_execution::prefs::RegisterProfilePrefs(registry);
@@ -2037,7 +2038,6 @@
   NewTabPageHandler::RegisterProfilePrefs(registry);
   NewTabPageUI::RegisterProfilePrefs(registry);
   ntp::SafeBrowsingHandler::RegisterProfilePrefs(registry);
-  ntp_tiles::CustomLinksManagerImpl::RegisterProfilePrefs(registry);
   OutlookCalendarPageHandler::RegisterProfilePrefs(registry);
   PinnedTabCodec::RegisterProfilePrefs(registry);
   promos_utils::RegisterProfilePrefs(registry);