Index: chrome/android/java/src/org/chromium/chrome/browser/omnibox/AutocompleteController.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/AutocompleteController.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/AutocompleteController.java |
index 12ecd35ff03162d45aaf18738d8d58d586febec6..e5d294280733f2a87997285830c603b436746dc3 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/AutocompleteController.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/AutocompleteController.java |
@@ -9,6 +9,7 @@ import android.text.TextUtils; |
import org.chromium.base.VisibleForTesting; |
import org.chromium.base.annotations.CalledByNative; |
+import org.chromium.chrome.browser.WarmupManager; |
import org.chromium.chrome.browser.omnibox.OmniboxSuggestion.MatchClassification; |
import org.chromium.chrome.browser.omnibox.VoiceSuggestionProvider.VoiceResult; |
import org.chromium.chrome.browser.profiles.Profile; |
@@ -159,6 +160,11 @@ public class AutocompleteController { |
public void startZeroSuggest(Profile profile, String omniboxText, String url, |
boolean focusedFromFakebox) { |
if (profile == null || TextUtils.isEmpty(url)) return; |
+ |
+ // Proactively start up a renderer, to reduce the time to display search results, |
+ // especially if a Service Worker is used. |
+ WarmupManager.getInstance().createSpareRenderProcessHost(profile); |
Ted C
2017/06/30 16:16:56
Is OmniboxPrerender fully disabled at this point?
mattcary
2017/07/03 08:03:02
It's 99% disabled, but that's a good point. Added
mattcary
2017/07/03 08:08:33
Actually, on further reflection, the spare rendere
|
+ |
mNativeAutocompleteControllerAndroid = nativeInit(profile); |
if (mNativeAutocompleteControllerAndroid != 0) { |
if (mUseCachedZeroSuggestResults) mWaitingForSuggestionsToCache = true; |