| Index: chrome/browser/infobars/infobar_service.cc
|
| diff --git a/chrome/browser/infobars/infobar_service.cc b/chrome/browser/infobars/infobar_service.cc
|
| index fdfd9a6339e58d4abcab52061f67e3739d727d26..77f9937ce2ed08e862781905d1e7515ed195f240 100644
|
| --- a/chrome/browser/infobars/infobar_service.cc
|
| +++ b/chrome/browser/infobars/infobar_service.cc
|
| @@ -129,3 +129,14 @@ bool InfoBarService::OnMessageReceived(const IPC::Message& message) {
|
| void InfoBarService::OnDidBlockDisplayingInsecureContent() {
|
| InsecureContentInfoBarDelegate::Create(this);
|
| }
|
| +
|
| +void InfoBarService::OpenURL(const GURL& url,
|
| + WindowOpenDisposition disposition) {
|
| + // A normal user click on an infobar URL will result in a CURRENT_TAB
|
| + // disposition; turn that into a NEW_FOREGROUND_TAB so that we don't end up
|
| + // smashing the page the user is looking at.
|
| + web_contents()->OpenURL(content::OpenURLParams(
|
| + url, content::Referrer(),
|
| + (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
|
| + ui::PAGE_TRANSITION_LINK, false));
|
| +}
|
|
|