Chromium Code Reviews| Index: chrome/browser/chrome_content_browser_client.cc |
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
| index cce6055d14114802396ae3cbd025d6e14eba2cb0..c51e0058a25393e1d2ab8e9043aa9e0e2c945562 100644 |
| --- a/chrome/browser/chrome_content_browser_client.cc |
| +++ b/chrome/browser/chrome_content_browser_client.cc |
| @@ -1154,6 +1154,22 @@ bool ChromeContentBrowserClient::ShouldAllowOpenURL( |
| return true; |
| } |
| +void ChromeContentBrowserClient::OverrideOpenURLParams( |
| + const content::SiteInstance* site_instance, |
| + content::OpenURLParams* params) { |
| + DCHECK(params); |
| + if (site_instance && |
| + site_instance->GetSiteURL().SchemeIs(chrome::kChromeSearchScheme) && |
| + site_instance->GetSiteURL().host() == |
| + chrome::kChromeSearchRemoteNtpHost && |
|
Marc Treib
2016/06/27 13:08:15
Also for the local NTP please!
mastiz
2016/06/27 13:50:53
Done.
|
| + ui::PageTransitionCoreTypeIs(params->transition, |
| + ui::PAGE_TRANSITION_LINK)) { |
| + // Make any click on the new tab page a AUTO_BOOKMARK, consistently with |
| + // native implementations like Android's. |
|
Marc Treib
2016/06/27 13:08:15
nit: This isn't quite accurate - it'll also make e
mastiz
2016/06/27 13:50:53
Done, PTAL.
|
| + params->transition = ui::PAGE_TRANSITION_AUTO_BOOKMARK; |
|
Marc Treib
2016/06/27 13:08:15
The old code also set renderer_initiated to false,
mastiz
2016/06/27 13:50:53
Done, went conservative and cleared the field out
|
| + } |
| +} |
| + |
| bool ChromeContentBrowserClient::IsSuitableHost( |
| content::RenderProcessHost* process_host, |
| const GURL& site_url) { |