Index: content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java b/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java |
index 403c9065588a62fbb315440b07cb903991f77c36..be5e2f92123646765e8f41d54a81050389696152 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java |
@@ -13,10 +13,10 @@ import com.google.common.annotations.VisibleForTesting; |
import org.chromium.base.CalledByNative; |
import org.chromium.base.JNINamespace; |
import org.chromium.base.ThreadUtils; |
+import org.chromium.base.library_loader.LibraryLoader; |
+import org.chromium.base.library_loader.LoaderErrors; |
+import org.chromium.base.library_loader.ProcessInitException; |
import org.chromium.content.app.ContentMain; |
-import org.chromium.content.app.LibraryLoader; |
-import org.chromium.content.common.ProcessInitException; |
-import org.chromium.content.common.ResultCodes; |
import java.util.ArrayList; |
import java.util.List; |
@@ -37,6 +37,9 @@ import java.util.List; |
@JNINamespace("content") |
public class BrowserStartupController { |
+ /** |
+ * This provides the interface to the callbacks for successful or failed startup |
+ */ |
public interface StartupCallback { |
void onSuccess(boolean alreadyStarted); |
void onFailure(); |
@@ -196,7 +199,7 @@ public class BrowserStartupController { |
// Startup should now be complete |
assert mStartupDone; |
if (!mStartupSuccess) { |
- throw new ProcessInitException(ResultCodes.RESULT_CODE_NATIVE_STARTUP_FAILED); |
+ throw new ProcessInitException(LoaderErrors.LOADER_ERROR_NATIVE_STARTUP_FAILED); |
} |
} |
@@ -268,7 +271,13 @@ public class BrowserStartupController { |
// Normally Main.java will have already loaded the library asynchronously, we only need |
// to load it here if we arrived via another flow, e.g. bookmark access & sync setup. |
- LibraryLoader.ensureInitialized(); |
+ // TODO(aberent): This try/catch is temporary code to ease landing the change. It can |
+ // be removed once the downstream changes have landed |
+ try { |
+ LibraryLoader.ensureInitialized(); |
+ } catch (org.chromium.base.library_loader.ProcessInitException e) { |
+ throw new ProcessInitException(e.getErrorCode()); |
+ } |
// TODO(yfriedman): Remove dependency on a command line flag for this. |
DeviceUtils.addDeviceSpecificUserAgentSwitch(mContext); |