| 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..6d2b86f9dc283de426b5c2bedfdd5d07d0132b8a 100644
|
| --- a/chrome/browser/android/shortcut_helper.cc
|
| +++ b/chrome/browser/android/shortcut_helper.cc
|
| @@ -72,11 +72,6 @@ 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)) {
|
| - InstallWebApkWithSkBitmap(browser_context, info, icon_bitmap);
|
| - return;
|
| - }
|
| AddWebappWithSkBitmap(info, webapp_id, icon_bitmap, splash_image_callback);
|
| return;
|
| }
|
| @@ -87,10 +82,11 @@ void ShortcutHelper::AddToLauncherWithSkBitmap(
|
| void ShortcutHelper::InstallWebApkWithSkBitmap(
|
| content::BrowserContext* browser_context,
|
| const ShortcutInfo& info,
|
| - const SkBitmap& icon_bitmap) {
|
| + const SkBitmap& icon_bitmap,
|
| + const WebApkPackageNameAvailableCallback& callback) {
|
| // WebApkInstaller destroys itself when it is done.
|
| WebApkInstaller* installer = new WebApkInstaller(info, icon_bitmap);
|
| - installer->InstallAsync(browser_context,
|
| + installer->InstallAsync(browser_context, callback,
|
| base::Bind(&ShortcutHelper::OnBuiltWebApk));
|
| }
|
|
|
|
|