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

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

Issue 2670963002: Android: Fire the appinstalled event on WebAPK installation. (Closed)
Patch Set: Created 3 years, 10 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 090e1f260a452ca9e831cda9ca0cc8cafcef5086..3342d5be3b033bd483bed7342a26b23f5c970193 100644
--- a/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
+++ b/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
@@ -367,13 +367,15 @@ bool AppBannerInfoBarDelegateAndroid::TriggeredFromBanner() const {
}
void AppBannerInfoBarDelegateAndroid::SendBannerAccepted() {
- if (weak_manager_ && TriggeredFromBanner()) {
+ if (!weak_manager_)
+ return;
+
+ if (TriggeredFromBanner())
weak_manager_->SendBannerAccepted(event_request_id_);
- // TODO(mgiuca): Send the appinstalled event for WebAPKs (but just removing
- // this check won't be sufficient).
- if (!is_webapk_)
- weak_manager_->OnInstall();
- }
+
+ // Send the appinstalled event in all cases (whether triggered from a banner
+ // or not).
+ weak_manager_->OnInstall();
dominickn 2017/02/03 05:54:46 This doesn't work because weak_manager_ is nullptr
Matt Giuca 2017/04/07 06:41:34 Done.
}
void AppBannerInfoBarDelegateAndroid::OnWebApkInstallFinished(
« 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