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

Unified Diff: chrome/browser/ui/cocoa/keystone_infobar_delegate.mm

Issue 1142153002: Simplify infobar expiry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android compile Created 5 years, 7 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/ui/cocoa/keystone_infobar_delegate.mm
diff --git a/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm b/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm
index ca95f75ff1906479ff067550ee45bee075cb05eb..02a3434cf546ef266c203185f215cb5515308481 100644
--- a/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm
+++ b/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm
@@ -52,7 +52,7 @@ class KeystonePromotionInfoBarDelegate : public ConfirmInfoBarDelegate {
// ConfirmInfoBarDelegate
int GetIconID() const override;
- bool ShouldExpireInternal(const NavigationDetails& details) const override;
+ bool ShouldExpire(const NavigationDetails& details) const override;
base::string16 GetMessageText() const override;
base::string16 GetButtonLabel(InfoBarButton button) const override;
bool Accept() override;
@@ -108,9 +108,9 @@ int KeystonePromotionInfoBarDelegate::GetIconID() const {
return IDR_PRODUCT_LOGO_32;
}
-bool KeystonePromotionInfoBarDelegate::ShouldExpireInternal(
+bool KeystonePromotionInfoBarDelegate::ShouldExpire(
const NavigationDetails& details) const {
- return can_expire_;
+ return can_expire_ && ConfirmInfoBarDelegate::ShouldExpire(details);
}
base::string16 KeystonePromotionInfoBarDelegate::GetMessageText() const {

Powered by Google App Engine
This is Rietveld 408576698