Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3852)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java

Issue 2254863002: Revert of Android: Make the spare renderer accessible to all Chrome tabs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
index 594f725d26974ff7825645b23c54206fa3d9a999..48bcfcf6290fb332c35f52e07806ffc7c6fa28d6 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
@@ -38,7 +38,6 @@
import org.chromium.chrome.browser.IntentHandler;
import org.chromium.chrome.browser.IntentHandler.ExternalAppId;
import org.chromium.chrome.browser.KeyboardShortcuts;
-import org.chromium.chrome.browser.WarmupManager;
import org.chromium.chrome.browser.WebContentsFactory;
import org.chromium.chrome.browser.appmenu.AppMenuPropertiesDelegate;
import org.chromium.chrome.browser.compositor.layouts.LayoutManagerDocument;
@@ -93,12 +92,10 @@
private boolean mHasCreatedTabEarly;
private boolean mIsInitialStart = true;
- // Whether there is any prerender associated with the session.
private boolean mHasPrerender;
private CustomTabObserver mTabObserver;
private String mPrerenderedUrl;
- // Whether a prerender is being used.
private boolean mHasPrerendered;
private static class PageLoadMetricsObserver implements PageLoadMetrics.Observer {
@@ -252,8 +249,7 @@
@Override
public boolean shouldAllocateChildConnection() {
- return !mHasCreatedTabEarly && !mHasPrerender
- && !WarmupManager.getInstance().hasSpareWebContents();
+ return !mHasCreatedTabEarly && !mHasPrerender;
}
@Override
@@ -415,9 +411,7 @@
WebContents webContents =
customTabsConnection.takePrerenderedUrl(mSession, url, referrerUrl);
mHasPrerendered = webContents != null;
- if (!mHasPrerendered) {
- webContents = WarmupManager.getInstance().takeSpareWebContents(false, false);
- }
+ if (webContents == null) webContents = customTabsConnection.takeSpareWebContents();
if (webContents == null) webContents = WebContentsFactory.createWebContents(false, false);
tab.initialize(webContents, getTabContentManager(),
new CustomTabDelegateFactory(mIntentDataProvider.shouldEnableUrlBarHiding()), false,

Powered by Google App Engine
This is Rietveld 408576698