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

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

Issue 2050933002: Upstream: Add additional checks before creating a WebAPK after clicking "Add to Homescreen" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'create_webapk_requirements_enum_class' into create_webapk_requirements2 Created 4 years, 5 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 e4769d98c6e7eda455c325684699a18b4f7067ed..f12bd23afd9570c1f492412b68fee3fa3a5fac14 100644
--- a/chrome/browser/android/shortcut_helper.cc
+++ b/chrome/browser/android/shortcut_helper.cc
@@ -87,8 +87,7 @@ void ShortcutHelper::AddShortcutInBackgroundWithSkBitmap(
base::android::ConvertUTF8ToJavaString(env, info.manifest_url.spec());
uintptr_t callback_pointer = 0;
- if (info.display == blink::WebDisplayModeStandalone ||
- info.display == blink::WebDisplayModeFullscreen) {
+ if (info.type == ShortcutInfo::Type::WEBAPP) {
// The callback will need to be run after shortcut creation completes in
// order to download the splash image and save it to the WebappDataStorage.
// Create a copy of the callback here and send the pointer to Java, which
@@ -101,6 +100,7 @@ void ShortcutHelper::AddShortcutInBackgroundWithSkBitmap(
Java_ShortcutHelper_addShortcut(
env,
java_webapp_id.obj(),
+ static_cast<int>(info.type),
java_url.obj(),
java_user_title.obj(),
java_name.obj(),
« no previous file with comments | « chrome/browser/android/banners/app_banner_infobar_delegate_android.cc ('k') | chrome/browser/android/shortcut_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698