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

Unified Diff: chrome/browser/android/shortcut_helper.cc

Issue 2259093003: Move native "enable-webapk" check to ChromeWebApkHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error. Created 4 years, 4 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
Index: chrome/browser/android/shortcut_helper.cc
diff --git a/chrome/browser/android/shortcut_helper.cc b/chrome/browser/android/shortcut_helper.cc
index c30ff516b35a0fde359c6d43e5967e9f94c937d4..6c4469059144a971b1d7208b19ad9f9f71e9adcb 100644
--- a/chrome/browser/android/shortcut_helper.cc
+++ b/chrome/browser/android/shortcut_helper.cc
@@ -14,6 +14,7 @@
#include "base/command_line.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/android/webapk/chrome_webapk_host.h"
#include "chrome/browser/android/webapk/webapk_installer.h"
#include "chrome/browser/manifest/manifest_icon_downloader.h"
#include "chrome/common/chrome_switches.h"
@@ -72,8 +73,7 @@ void ShortcutHelper::AddToLauncherWithSkBitmap(
const base::Closure& splash_image_callback) {
if (info.display == blink::WebDisplayModeStandalone ||
info.display == blink::WebDisplayModeFullscreen) {
- JNIEnv* env = base::android::AttachCurrentThread();
- if (Java_ShortcutHelper_areWebApksEnabled(env)) {
+ if (ChromeWebApkHost::AreWebApkEnabled()) {
InstallWebApkWithSkBitmap(browser_context, info, icon_bitmap);
return;
}

Powered by Google App Engine
This is Rietveld 408576698