| Index: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java
|
| index 5523f9283e1794f30c787d7516d0d98bb8c48d8f..9c57c610fe5ed21f61ee5fb98caabb5169f9d457 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java
|
| @@ -20,6 +20,7 @@ import org.chromium.base.annotations.CalledByNative;
|
| import org.chromium.chrome.browser.AppHooks;
|
| import org.chromium.chrome.browser.ShortcutHelper;
|
| import org.chromium.chrome.browser.banners.InstallerDelegate;
|
| +import org.chromium.chrome.browser.metrics.WebApkUma;
|
| import org.chromium.chrome.browser.util.IntentUtils;
|
|
|
| import java.io.File;
|
| @@ -107,11 +108,6 @@ public class WebApkInstaller {
|
| @CalledByNative
|
| private void installWebApkFromGooglePlayAsync(
|
| String packageName, int version, String title, String token, String url) {
|
| - if (mGooglePlayWebApkInstallDelegate == null) {
|
| - notify(WebApkInstallResult.FAILURE);
|
| - return;
|
| - }
|
| -
|
| // Check whether the WebAPK package is already installed. The WebAPK may have been installed
|
| // by another Chrome version (e.g. Chrome Dev). We have to do this check because the Play
|
| // install API fails silently if the package is already installed.
|
| @@ -120,6 +116,13 @@ public class WebApkInstaller {
|
| return;
|
| }
|
|
|
| + if (mGooglePlayWebApkInstallDelegate == null) {
|
| + notify(WebApkInstallResult.FAILURE);
|
| + WebApkUma.recordGooglePlayInstallResult(
|
| + WebApkUma.GOOGLE_PLAY_INSTALL_FAILED_NO_DELEGATE);
|
| + return;
|
| + }
|
| +
|
| Callback<Integer> callback = new Callback<Integer>() {
|
| @Override
|
| public void onResult(Integer result) {
|
|
|