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

Unified Diff: chrome/browser/android/webapk/chrome_webapk_host.cc

Issue 2716493002: Add a variations parameter to control WebAPK renderer launching. (Closed)
Patch Set: Rebase to master Created 3 years, 10 months 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0d734904f9eefff4d2135903d380d4b30143925e..f7653c4e65b8d1340b3cacdde5b8721718ce5eb2 100644
--- a/chrome/browser/android/webapk/chrome_webapk_host.cc
+++ b/chrome/browser/android/webapk/chrome_webapk_host.cc
@@ -13,6 +13,10 @@ namespace {
// Variations flag to enable installing WebAPKs using Google Play.
const char* kPlayInstall = "play_install";
+// Variations flag to enable launching Chrome renderer in WebAPK process.
+const char* kLaunchRendererInWebApkProcess =
+ "launch_renderer_in_webapk_process";
+
} // anonymous namespace
// static
@@ -42,6 +46,15 @@ jboolean CanUseGooglePlayToInstallWebApk(
}
// static
+jboolean CanLaunchRendererInWebApkProcess(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jclass>& clazz) {
+ return variations::GetVariationParamValueByFeature(
+ chrome::android::kImprovedA2HS, kLaunchRendererInWebApkProcess) ==
+ "true";
+}
+
+// static
jboolean CanInstallFromUnknownSources(
JNIEnv* env,
const base::android::JavaParamRef<jclass>& clazz) {
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698