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

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: Rebase. Created 3 years, 8 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 c0b69b8270aa85d7f07b074489deaec14d67ba4f..72ee1a809b65dbd8c3abfd339129312720a7d9ed 100644
--- a/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
+++ b/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
@@ -352,13 +352,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
dominickn 2017/04/24 00:56:30 This comment seems superfluous. What's more import
Matt Giuca 2017/04/24 01:42:13 Done. I don't think big-oh works like that...
+ // or not).
+ weak_manager_->OnInstall();
}
void AppBannerInfoBarDelegateAndroid::OnWebApkInstallFinished(

Powered by Google App Engine
This is Rietveld 408576698