| Index: chrome/browser/android/webapk/chrome_webapk_host.cc
|
| diff --git a/chrome/browser/android/webapk/chrome_webapk_host.cc b/chrome/browser/android/webapk/chrome_webapk_host.cc
|
| index 4014e2f6fbd9811ae0bb45a627de8bbbf79b57e7..1ebfe489246fc3076d391f0c714144da27011ca7 100644
|
| --- a/chrome/browser/android/webapk/chrome_webapk_host.cc
|
| +++ b/chrome/browser/android/webapk/chrome_webapk_host.cc
|
| @@ -4,10 +4,32 @@
|
|
|
| #include "chrome/browser/android/webapk/chrome_webapk_host.h"
|
|
|
| +#include "chrome/browser/android/chrome_feature_list.h"
|
| +#include "components/variations/variations_associated_data.h"
|
| #include "jni/ChromeWebApkHost_jni.h"
|
|
|
| +namespace {
|
| +
|
| +// Variations flag to enable installing WebAPKs using Google Play.
|
| +const char* kPlayInstall = "play_install";
|
| +
|
| +} // anonymous namespace
|
| +
|
| +// static
|
| +bool ChromeWebApkHost::Register(JNIEnv* env) {
|
| + return RegisterNativesImpl(env);
|
| +}
|
| +
|
| // static
|
| bool ChromeWebApkHost::AreWebApkEnabled() {
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
| return Java_ChromeWebApkHost_areWebApkEnabled(env);
|
| }
|
| +
|
| +// static
|
| +jboolean CanUseGooglePlayToInstallWebApk(
|
| + JNIEnv* env,
|
| + const base::android::JavaParamRef<jclass>& clazz) {
|
| + return variations::GetVariationParamValueByFeature(
|
| + chrome::android::kImprovedA2HS, kPlayInstall) == "true";
|
| +}
|
|
|