Code: std::unique_ptr<PrefService> CreatePrefService() {
  auto pref_registry = base::MakeRefCounted<user_prefs::PrefRegistrySyncable>();
 
   metrics::MetricsService::RegisterPrefs(pref_registry.get());
   variations::VariationsService::RegisterPrefs(pref_registry.get());
 
   AwBrowserProcess::RegisterNetworkContextLocalStatePrefs(pref_registry.get());
 
  PrefServiceFactory pref_service_factory;

  std::set<std::string> persistent_prefs;
  for (const char* const pref_name : kPersistentPrefsWhitelist)
    persistent_prefs.insert(pref_name);

  pref_service_factory.set_user_prefs(base::MakeRefCounted<SegregatedPrefStore>(
      base::MakeRefCounted<InMemoryPrefStore>(),
      base::MakeRefCounted<JsonPrefStore>(GetPrefStorePath()), persistent_prefs,
      mojo::Remote<::prefs::mojom::TrackedPreferenceValidationDelegate>()));

  pref_service_factory.set_read_error_callback(
      base::BindRepeating(&HandleReadError));

   return pref_service_factory.Create(pref_registry);
 }

Vulnerability Type: 
CWE ID: CWE-20
Summary: Inappropriate implementation in Omnibox in Google Chrome prior to 59.0.3071.92 for Android allowed a remote attacker to perform domain spoofing with RTL characters via a crafted URL page.
Commit Message: [AW] Add Variations.RestartsWithStaleSeed metric.

This metric records the number of consecutive times the WebView browser
process starts with a stale seed. It's written when a fresh seed is
loaded after previously loading a stale seed.

Test: Manually verified with logging that the metric was written.
Bug: 1010625
Change-Id: Iadedb45af08d59ecd6662472670f848e8e99a8d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1851126
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709417}