| Index: chrome/browser/banners/app_banner_manager.h
|
| diff --git a/chrome/browser/banners/app_banner_manager.h b/chrome/browser/banners/app_banner_manager.h
|
| index d14251b7dc4aeaf9c35048e288ad112c24d9f9f9..ebb8cbe3214d866d11e739693e19786e68fc9463 100644
|
| --- a/chrome/browser/banners/app_banner_manager.h
|
| +++ b/chrome/browser/banners/app_banner_manager.h
|
| @@ -101,6 +101,14 @@ class AppBannerManager : public content::WebContentsObserver,
|
| // The banner pipeline is currently running for this page load.
|
| ACTIVE,
|
|
|
| + // The banner pipeline is currently waiting for the page manifest to be
|
| + // fetched.
|
| + PENDING_MANIFEST,
|
| +
|
| + // The banner pipeline is currently waiting for the installability criteria
|
| + // to be checked.
|
| + PENDING_INSTALLABLE_CHECK,
|
| +
|
| // The banner pipeline has finished running, but is waiting for sufficient
|
| // engagement to trigger the banner.
|
| PENDING_ENGAGEMENT,
|
| @@ -212,8 +220,18 @@ class AppBannerManager : public content::WebContentsObserver,
|
| int event_request_id() const { return event_request_id_; }
|
| bool is_active() const { return state_ == State::ACTIVE; }
|
| bool is_active_or_pending() const {
|
| - return state_ == State::ACTIVE || state_ == State::PENDING_ENGAGEMENT ||
|
| - state_ == State::PENDING_EVENT;
|
| + switch (state_) {
|
| + case State::ACTIVE:
|
| + case State::PENDING_MANIFEST:
|
| + case State::PENDING_INSTALLABLE_CHECK:
|
| + case State::PENDING_ENGAGEMENT:
|
| + case State::PENDING_EVENT:
|
| + return true;
|
| + case State::INACTIVE:
|
| + case State::COMPLETE:
|
| + return false;
|
| + }
|
| + return false;
|
| }
|
| bool is_complete() const { return state_ == State::COMPLETE; }
|
| bool is_pending_engagement() const {
|
|
|