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

Unified Diff: chrome/browser/translate/translate_infobar_delegate.cc

Issue 6883299: Hide translate infobar on programmatic navigation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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/translate/translate_infobar_delegate.cc
diff --git a/chrome/browser/translate/translate_infobar_delegate.cc b/chrome/browser/translate/translate_infobar_delegate.cc
index 3e67c2271cc421203a151f3e6fae521e0ccd6cb4..0d40e4a7ff4b976010c2bdd232ebb1622310abbc 100644
--- a/chrome/browser/translate/translate_infobar_delegate.cc
+++ b/chrome/browser/translate/translate_infobar_delegate.cc
@@ -350,6 +350,15 @@ TranslateInfoBarDelegate::TranslateInfoBarDelegate(
}
}
+bool TranslateInfoBarDelegate::ShouldExpire(
+ const NavigationController::LoadCommittedDetails& details) const {
+ // Note: we allow closing this infobar even if the navigation was programmatic
+ // and not initiated by the user - crbug.com/70261 .
+ return (contents_unique_id_ != details.entry->unique_id()) ||
brettw 2011/05/02 16:35:25 Might we still want to check that it's the main fr
jeremy 2011/05/11 08:24:03 Done.
+ (PageTransition::StripQualifier(details.entry->transition_type()) ==
+ PageTransition::RELOAD);
+}
+
void TranslateInfoBarDelegate::InfoBarDismissed() {
if (type_ != BEFORE_TRANSLATE)
return;

Powered by Google App Engine
This is Rietveld 408576698