| 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..7b7ec20717dc9eed65417dd09ef164b52277dd4d 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,17 @@ 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. Note that this is fired *before* the
|
| + // installation actually takes place (which can be a significant amount of
|
| + // time later, especially if using WebAPKs).
|
| + // TODO(mgiuca): Fire the event *after* the installation is completed.
|
| + weak_manager_->OnInstall();
|
| }
|
|
|
| void AppBannerInfoBarDelegateAndroid::OnWebApkInstallFinished(
|
|
|