diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-16 23:19:32 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-16 23:19:32 +0000 |
commit | adb5ab5db0b893fca6928b153e454cc6ef248256 (patch) | |
tree | da394941753b86112d7ddb0e6ab42a76235d2ba3 /chrome/browser/autofill | |
parent | eefbe99e5246766745bc2fd613f08c42d4b35f32 (diff) | |
download | chromium_src-adb5ab5db0b893fca6928b153e454cc6ef248256.zip chromium_src-adb5ab5db0b893fca6928b153e454cc6ef248256.tar.gz chromium_src-adb5ab5db0b893fca6928b153e454cc6ef248256.tar.bz2 |
Be more consistent about respecting link click dispositions in infobars: for most infobars, we should open with the desired disposition, unless it would overwrite the current window, in which case we use a new foreground tab.
BUG=none
TEST=none
Review URL: https://codereview.chromium.org/11778029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194480 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r-- | chrome/browser/autofill/autofill_cc_infobar_delegate.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/autofill/autofill_cc_infobar_delegate.cc b/chrome/browser/autofill/autofill_cc_infobar_delegate.cc index 753aa66..478d277 100644 --- a/chrome/browser/autofill/autofill_cc_infobar_delegate.cc +++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.cc @@ -110,11 +110,12 @@ string16 AutofillCCInfoBarDelegate::GetLinkText() const { bool AutofillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { owner()->GetWebContents()->GetDelegate()->OpenURLFromTab( owner()->GetWebContents(), - content::OpenURLParams(GURL(autofill::kHelpURL), - content::Referrer(), - NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, - false)); + content::OpenURLParams( + GURL(autofill::kHelpURL), + content::Referrer(), + (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, + content::PAGE_TRANSITION_LINK, + false)); return false; } |