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

Unified Diff: chrome/browser/android/banners/app_banner_data_fetcher_android.cc

Issue 2124703003: Do not show "Add to Home Screen" info bar if WebAPK is installed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into webapk_app_banner_already_installed 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_data_fetcher_android.cc
diff --git a/chrome/browser/android/banners/app_banner_data_fetcher_android.cc b/chrome/browser/android/banners/app_banner_data_fetcher_android.cc
index 10164088aa5ddfb2cfc92468681e243ffb5e2a2e..3357f612ef13a9e166dcaed5975ca2ed6ee5632b 100644
--- a/chrome/browser/android/banners/app_banner_data_fetcher_android.cc
+++ b/chrome/browser/android/banners/app_banner_data_fetcher_android.cc
@@ -73,6 +73,15 @@ base::Closure AppBannerDataFetcherAndroid::FetchWebappSplashScreenImageCallback(
minimum_splash_image_size_in_dp_, webapp_id);
}
+bool AppBannerDataFetcherAndroid::IsWebAppInstalled(
+ content::BrowserContext* browser_context,
+ const GURL& start_url) {
+ // Check whether a WebAPK is installed in order to block showing the app
+ // banner if a WebAPK is installed even after a user clears Chrome's data.
+ // This function does not check whether a non-WebAPK web app is installed.
+ return ShortcutHelper::IsWebApkInstalled(start_url);
+}
+
void AppBannerDataFetcherAndroid::ShowBanner(const GURL& icon_url,
const SkBitmap* icon,
const base::string16& title,
« no previous file with comments | « chrome/browser/android/banners/app_banner_data_fetcher_android.h ('k') | chrome/browser/android/shortcut_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698