Remove GoogleURLTracker

The class is now a no-op as of
https://chromium-review.googlesource.com/c/chromium/src/+/1686726.
It never fires its observer calls and always returns https://www.google.com/.
Move that constant to google_util and unwind the rest.

This ends up touching a lot of files. The two interesting parts:

- Check that GoogleURLTracker is always created with ALWAYS_DOT_COM_MODE,
  and that, in ALWAYS_DOT_COM_MODE, it degenerates into return
  kDefaultGoogleHomepage. (Apart from test code which manually triggers
  bits of it.) That means we can replace all uses of
  GoogleURLTracker::google_url with the newly-added
  google_util::kGoogleHomepageURL and remove everything that registers
  callbacks.

- Check that nothing else uses the prefs in google_pref_names.h, and
  thus they can be removed. Check that I've correctly replaced them with
  migration code in chrome/browser/prefs/browser_prefs.cc and
  ios/chrome/browser/prefs/browser_prefs.mm

From there, this CL does that following:

- Remove GoogleURLTracker and associated classes from tests and production
  code.

- //components/google/core/browser got folded into
  //components/google/core/common

- A bunch of test-only functions to simulate the Google URL changing are
  gone.

- UIThreadSearchTermsData in both iOS and non-iOS no longer needs a Profile
  parameter.

Hopefully that's enough context that one can review the bulk of the CL
(which is fairly uninteresting) without too much trouble.

Bug: 973591
Change-Id: I4aa3606e4a1b2ccf2d33932c22a69b74e5176753
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1687348
Commit-Queue: David Benjamin <[email protected]>
Reviewed-by: Richard Coles <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Dominic Battré <[email protected]>
Reviewed-by: Kyle Milka <[email protected]>
Reviewed-by: Cait Phillips <[email protected]>
Reviewed-by: Rohit Rao <[email protected]>
Reviewed-by: Ilya Sherman <[email protected]>
Reviewed-by: Mark Pearson <[email protected]>
Cr-Commit-Position: refs/heads/master@{#683207}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 75be9663..1e604e9 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -477,6 +477,10 @@
     "webauthn.ble.paired_mac_addresses";
 #endif  // defined(OS_ANDROID)
 
+// Deprecated 7/2019
+const char kLastKnownGoogleURL[] = "browser.last_known_google_url";
+const char kLastPromptedGoogleURL[] = "browser.last_prompted_google_url";
+
 // Register prefs used only for migration (clearing or moving to a new key).
 void RegisterProfilePrefsForMigration(
     user_prefs::PrefRegistrySyncable* registry) {
@@ -543,6 +547,9 @@
                                std::string());
   registry->RegisterListPref(kWebAuthnBlePairedMacAddressesPrefName);
 #endif  // defined(OS_ANDROID)
+
+  registry->RegisterStringPref(kLastKnownGoogleURL, std::string());
+  registry->RegisterStringPref(kLastPromptedGoogleURL, std::string());
 }
 
 }  // namespace
@@ -1126,6 +1133,8 @@
   syncer::MigrateSyncSuppressedPref(profile_prefs);
   profile_prefs->ClearPref(kSignedInTime);
   syncer::ClearObsoleteMemoryPressurePrefs(profile_prefs);
+  profile_prefs->ClearPref(kLastKnownGoogleURL);
+  profile_prefs->ClearPref(kLastPromptedGoogleURL);
 
 #if defined(OS_ANDROID)
   // Added 7/2019.