Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1258)

Unified Diff: content/browser/frame_host/navigator_impl.cc

Issue 1227793006: Navigations are renderer-initiated if no WebUI bindings present. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply WebUI bindings criterion to entire block. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698