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

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

Issue 2652903005: Use the manifest start URL to query the existence of a WebAPK (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b9ccb59699fc5c3e8a89f18c1842c1dc349d5327..21d68dff1e18ac4c5d0f60aed2927ded7a766667 100644
--- a/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
+++ b/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
@@ -56,12 +56,10 @@ bool AppBannerInfoBarDelegateAndroid::Create(
webapk::InstallSource webapk_install_source) {
bool is_webapk = ChromeWebApkHost::AreWebApkEnabled();
std::string webapk_package_name = "";
- if (is_webapk) {
- webapk_package_name = ShortcutHelper::QueryWebApkPackage(
- web_contents->GetLastCommittedURL());
- }
- bool is_webapk_already_installed = !webapk_package_name.empty();
const GURL& url = shortcut_info->url;
+ if (is_webapk)
+ webapk_package_name = ShortcutHelper::QueryWebApkPackage(url);
+ bool is_webapk_already_installed = !webapk_package_name.empty();
auto infobar_delegate =
base::WrapUnique(new banners::AppBannerInfoBarDelegateAndroid(
weak_manager, app_title, std::move(shortcut_info), std::move(icon),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698