Commit da2a6677 authored by Natalie Chouinard's avatar Natalie Chouinard Committed by Commit Bot

Remove TemplateUrlService initialization from PrefServiceBridge

TemplateUrlService initialization occurs via
ProcessInitializationHandler.handlePostNativeInitialization() ->
SearchWidgetProvider.initialize(), so this out-of-place load appears to
be safe to remove.

Bug: 1016957
Change-Id: Iffab09bd1ba90e082eff2b588855b55f63b2fab7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1915281
Commit-Queue: Natalie Chouinard <chouinard@chromium.org>
Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715420}
parent 1e244051
......@@ -10,7 +10,6 @@ import androidx.annotation.VisibleForTesting;
import org.chromium.base.ThreadUtils;
import org.chromium.base.annotations.NativeMethods;
import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory;
/**
* PrefServiceBridge is a singleton which provides access to some native preferences. Ideally
......@@ -34,11 +33,6 @@ public class PrefServiceBridge {
ThreadUtils.assertOnUiThread();
if (sInstance == null) {
sInstance = new PrefServiceBridge();
// TODO(wnwen): Check while refactoring TemplateUrlService whether this belongs here.
// This is necessary as far as ensuring that TemplateUrlService is loaded at some point.
// Put initialization here to make instantiation in unit tests easier.
TemplateUrlServiceFactory.get().load();
}
return sInstance;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment