Index: chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java |
index e35d302650cec272c96b7ccfad30cdcc9c0adb76..77e5c0393e98aba8222b27d04dd3ba99dc98feb3 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java |
@@ -98,9 +98,11 @@ public abstract class InfoBar implements InfoBarView { |
// Determine if the infobar should be dismissed when |url| is loaded. Calling |
// setExpireOnNavigation(true/false) causes this method always to return true/false. |
- // For more control, subclasses can override this method and take the url into account. |
- public boolean shouldExpire(String url) { |
- return mExpireOnNavigation; |
+ // This only applies to java-only infobars. C++ infobars will use the same logic |
+ // as other platforms so they are not attempted to be dismissed twice. |
+ // It should really be removed once all infobars have a C++ counterpart. |
+ public final boolean shouldExpire(String url) { |
+ return mExpireOnNavigation && mNativeInfoBarPtr == 0; |
} |
// Sets whether the bar should be dismissed when a navigation occurs. |