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

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

Issue 1521013002: Make the ChromeBrowserInitializer the only way to start the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: yfriedman@ comment Created 5 years 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/CustomTabsConnection.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
index 077a8399b4f9543ef63d28883f0cfd0183e1eb35..18b4b8a62d549f1436a737765f13f85e81df328a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
@@ -158,10 +158,10 @@ public class CustomTabsConnection extends ICustomTabsService.Stub {
/** Warmup activities that should only happen once. */
@SuppressFBWarnings("DM_EXIT")
- private static void initializeBrowser(final ChromeApplication app) {
+ private static void initializeBrowser(final Application app) {
ThreadUtils.assertOnUiThread();
try {
- app.startBrowserProcessesAndLoadLibrariesSync(true);
+ ChromeBrowserInitializer.getInstance(app).handleSynchronousStartup();
} catch (ProcessInitException e) {
Log.e(TAG, "ProcessInitException while starting the browser process.");
// Cannot do anything without the native library, and cannot show a
@@ -203,7 +203,7 @@ public class CustomTabsConnection extends ICustomTabsService.Stub {
ThreadUtils.postOnUiThread(new Runnable() {
@Override
public void run() {
- if (!initialized) initializeBrowser((ChromeApplication) mApplication);
+ if (!initialized) initializeBrowser(mApplication);
if (mayCreateSpareWebContents && mPrerender == null && !SysUtils.isLowEndDevice()) {
createSpareWebContents();
}

Powered by Google App Engine
This is Rietveld 408576698