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

Unified Diff: chrome/browser/tab_contents/infobar_delegate.h

Issue 6883299: Hide translate infobar on programmatic navigation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update testcase. Created 9 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/tab_contents/infobar_delegate.h
diff --git a/chrome/browser/tab_contents/infobar_delegate.h b/chrome/browser/tab_contents/infobar_delegate.h
index ea56a1e3cd55b9ccd2305d15b02b89ee2a8fe887..dd1247263ecb96ee28694ca0cb4924a4157ce633 100644
--- a/chrome/browser/tab_contents/infobar_delegate.h
+++ b/chrome/browser/tab_contents/infobar_delegate.h
@@ -52,8 +52,8 @@ class InfoBarDelegate {
virtual bool EqualsDelegate(InfoBarDelegate* delegate) const;
// Returns true if the InfoBar should be closed automatically after the page
- // is navigated. The default behavior is to return true if the page is
- // navigated somewhere else or reloaded.
+ // is navigated. The default behavior is to return true if the user initiated
+ // navigation somewhere else or reloaded.
virtual bool ShouldExpire(
const NavigationController::LoadCommittedDetails& details) const;
@@ -91,6 +91,10 @@ class InfoBarDelegate {
// be expired from |contents_|.
void StoreActiveEntryUniqueID(TabContents* contents);
+ // Returns true if the navigation is to a new URL or a reload occured.
+ bool ShouldExpireInternal(
+ const NavigationController::LoadCommittedDetails& details) const;
+
private:
// The unique id of the active NavigationEntry of the TabContents that we were
// opened for. Used to help expire on navigations.

Powered by Google App Engine
This is Rietveld 408576698