Chromium Code Reviews| Index: content/browser/frame_host/navigator_impl.cc |
| diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc |
| index 9e01343db6382930805063b8321ecfb3c1242f72..439c5ec47b481330fc759d1c63175c7b777ad7ea 100644 |
| --- a/content/browser/frame_host/navigator_impl.cc |
| +++ b/content/browser/frame_host/navigator_impl.cc |
| @@ -562,24 +562,19 @@ void NavigatorImpl::RequestTransferURL( |
| params.should_replace_current_entry = should_replace_current_entry; |
| params.user_gesture = user_gesture; |
| - if (GetRenderManager(render_frame_host)->web_ui()) { |
| - // Web UI pages sometimes want to override the page transition type for |
| - // link clicks (e.g., so the new tab page can specify AUTO_BOOKMARK for |
|
Charlie Reis
2015/07/15 20:38:00
Looking deeper, this change doesn't look safe.
Ne
kmadhusu
2015/07/17 04:06:47
mathp@/fserb@: Please address this comment.
fserb
2015/07/17 15:59:11
Yep. We still rely on this when we analyse history
|
| - // automatically generated suggestions). We don't override other types |
| - // like TYPED because they have different implications (e.g., autocomplete). |
| - if (ui::PageTransitionCoreTypeIs( |
| - params.transition, ui::PAGE_TRANSITION_LINK)) |
| - params.transition = |
| - GetRenderManager(render_frame_host)->web_ui()-> |
| - GetLinkTransitionType(); |
| - |
| - // Note also that we hide the referrer for Web UI pages. We don't really |
| + // Note: extensions don't have bindings, so will not be affected by the |
|
Charlie Reis
2015/07/15 20:38:00
Extensions aren't a concept in content/, so I don'
|
| + // following code. |
| + int enabled_bindings = |
| + render_frame_host->render_view_host()->GetEnabledBindings(); |
| + if (enabled_bindings & content::BINDINGS_POLICY_WEB_UI) { |
| + // Note that we hide the referrer for Web UI pages. We don't really |
|
Charlie Reis
2015/07/15 20:37:59
nit: for Web UI pages with bindings.
|
| // want web sites to see a referrer of "chrome://blah" (and some |
| // chrome: URLs might have search terms or other stuff we don't want to |
| // send to the site), so we send no referrer. |
| params.referrer = Referrer(); |
|
Charlie Reis
2015/07/15 20:38:00
@kalman: Should extension processes be sending a n
not at google - send to devlin
2015/07/15 20:42:03
We should maintain the old, existing behavior.
|
| - // Navigations in Web UI pages count as browser-initiated navigations. |
| + // Navigations in Web UI pages (with WebUI bindings) count as |
|
Charlie Reis
2015/07/15 20:38:00
nit: Web UI
|
| + // browser-initiated navigations. |
| params.is_renderer_initiated = false; |
| } |