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

Unified Diff: chrome/browser/android/banners/app_banner_infobar_delegate_android.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/banners/app_banner_infobar_delegate_android.cc
diff --git a/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc b/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
index ba518910347409fa59d5ea72bcd26410deed79a9..d243b197be8811716821871681749c332799f229 100644
--- a/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
+++ b/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
@@ -11,7 +11,6 @@
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/android/shortcut_helper.h"
-#include "chrome/browser/android/shortcut_info.h"
#include "chrome/browser/android/tab_android.h"
#include "chrome/browser/banners/app_banner_data_fetcher.h"
#include "chrome/browser/banners/app_banner_metrics.h"
@@ -44,7 +43,8 @@ AppBannerInfoBarDelegateAndroid::AppBannerInfoBarDelegateAndroid(
const GURL& app_icon_url,
SkBitmap* app_icon,
const GURL& manifest_url,
- const content::Manifest& manifest)
+ const content::Manifest& manifest,
+ ShortcutInfo::Type webapp_type)
: data_fetcher_(data_fetcher),
app_title_(app_title),
app_icon_url_(app_icon_url),
@@ -52,6 +52,7 @@ AppBannerInfoBarDelegateAndroid::AppBannerInfoBarDelegateAndroid(
event_request_id_(event_request_id),
manifest_url_(manifest_url),
manifest_(manifest),
+ webapp_type_(webapp_type),
has_user_interaction_(false) {
DCHECK(!manifest.IsEmpty());
CreateJavaDelegate();
@@ -67,6 +68,7 @@ AppBannerInfoBarDelegateAndroid::AppBannerInfoBarDelegateAndroid(
: app_title_(app_title),
app_icon_(app_icon),
event_request_id_(event_request_id),
+ webapp_type_(ShortcutInfo::Type::OTHER),
native_app_data_(native_app_data),
native_app_package_(native_app_package),
referrer_(referrer),
@@ -256,6 +258,7 @@ bool AppBannerInfoBarDelegateAndroid::Accept() {
info.manifest_url = manifest_url_;
info.icon_url = app_icon_url_;
info.UpdateSource(ShortcutInfo::SOURCE_APP_BANNER);
+ info.type = webapp_type_;
const std::string& uid = base::GenerateGUID();
content::BrowserThread::PostTask(
« no previous file with comments | « chrome/browser/android/banners/app_banner_infobar_delegate_android.h ('k') | chrome/browser/android/shortcut_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698