| Index: chrome/android/java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHost.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHost.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHost.java
|
| index 1eeca2e601e30278d57a14003d2f70001d9f4101..5dfd6ea96ca998187ee90912b3f3f12423889de6 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHost.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHost.java
|
| @@ -20,9 +20,7 @@ import org.chromium.chrome.browser.externalauth.UserRecoverableErrorHandler;
|
| import org.chromium.chrome.browser.preferences.ChromePreferenceManager;
|
| import org.chromium.webapk.lib.client.WebApkValidator;
|
|
|
| -/**
|
| - * Contains functionality needed for Chrome to host WebAPKs.
|
| - */
|
| +/** Contains functionality needed for Chrome to host WebAPKs. */
|
| public class ChromeWebApkHost {
|
| private static final String TAG = "ChromeWebApkHost";
|
|
|
| @@ -32,7 +30,8 @@ public class ChromeWebApkHost {
|
| private static Boolean sEnabledForTesting;
|
|
|
| public static void init() {
|
| - WebApkValidator.initWithBrowserHostSignature(ChromeWebApkHostSignature.EXPECTED_SIGNATURE);
|
| + WebApkValidator.initWithBrowserHostSignature(
|
| + ChromeWebApkHostSignature.EXPECTED_SIGNATURE, ChromeWebApkHostSignature.PUBLIC_KEY);
|
| }
|
|
|
| public static void initForTesting(boolean enabled) {
|
| @@ -78,11 +77,11 @@ public class ChromeWebApkHost {
|
| }
|
|
|
| /**
|
| - * Returns whether installing WebAPKs from Google Play is possible.
|
| - * If {@link sCanUseGooglePlayInstall} hasn't been set yet, it returns false immediately and
|
| - * calls the Google Play Install API to update {@link sCanUseGooglePlayInstall} asynchronously.
|
| + * Returns whether installing WebAPKs from Google Play is possible. If {@link
|
| + * sCanUseGooglePlayInstall} hasn't been set yet, it returns false immediately and calls the
|
| + * Google Play Install API to update {@link sCanUseGooglePlayInstall} asynchronously.
|
| */
|
| - private static boolean canUseGooglePlayToInstallWebApk() {
|
| + public static boolean canUseGooglePlayToInstallWebApk() {
|
| return getGooglePlayInstallState() == GooglePlayInstallState.SUPPORTED;
|
| }
|
|
|
| @@ -122,6 +121,7 @@ public class ChromeWebApkHost {
|
| /**
|
| * Check the cached value to figure out if the feature is enabled. We have to use the cached
|
| * value because native library may not yet been loaded.
|
| + *
|
| * @return Whether the feature is enabled.
|
| */
|
| private static boolean isEnabledInPrefs() {
|
| @@ -165,6 +165,8 @@ public class ChromeWebApkHost {
|
| }
|
|
|
| private static native boolean nativeCanUseGooglePlayToInstallWebApk();
|
| +
|
| private static native boolean nativeCanLaunchRendererInWebApkProcess();
|
| +
|
| private static native boolean nativeCanInstallFromUnknownSources();
|
| }
|
|
|