Index: chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc |
diff --git a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc |
index 36fd45d7cb1c727ae3dfa5509b2e3f723846f400..2d7119826b6b6fd128441892fc60af9546df3918 100644 |
--- a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc |
+++ b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc |
@@ -63,6 +63,10 @@ base::string16 AlternateNavInfoBarDelegate::GetLinkText() const { |
return base::UTF8ToUTF16(match_.destination_url.spec()); |
} |
+GURL AlternateNavInfoBarDelegate::GetLinkURL() const { |
+ return match_.destination_url; |
+} |
+ |
bool AlternateNavInfoBarDelegate::LinkClicked( |
WindowOpenDisposition disposition) { |
// Tell the shortcuts backend to remove the shortcut it added for the original |
@@ -84,7 +88,7 @@ bool AlternateNavInfoBarDelegate::LinkClicked( |
// Pretend the user typed this URL, so that navigating to it will be the |
// default action when it's typed again in the future. |
InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL( |
- content::OpenURLParams(match_.destination_url, content::Referrer(), |
+ content::OpenURLParams(GetLinkURL(), content::Referrer(), |
disposition, ui::PAGE_TRANSITION_TYPED, |
false)); |