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

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

Issue 1426403006: Reland #1 of: Move WebUI ownership from the RenderFrameHostManager to the RenderFrameHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address CR comments. Created 5 years, 1 month 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 | « content/browser/frame_host/frame_tree.cc ('k') | content/browser/frame_host/render_frame_host_delegate.h » ('j') | 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 44bc5a8b9974266b3aa6a3b9dee813cdb8a177f1..0b83a77332fb7ad44ef08fd4704dd3b3a116b76f 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -576,9 +576,10 @@ void NavigatorImpl::RequestTransferURL(
bool should_replace_current_entry,
bool user_gesture) {
GURL dest_url(url);
+ RenderFrameHostImpl* current_render_frame_host =
+ GetRenderManager(render_frame_host)->current_frame_host();
SiteInstance* current_site_instance =
- GetRenderManager(render_frame_host)->current_frame_host()->
- GetSiteInstance();
+ current_render_frame_host->GetSiteInstance();
if (!GetContentClient()->browser()->ShouldAllowOpenURL(
current_site_instance, url)) {
dest_url = GURL(url::kAboutBlankURL);
@@ -605,7 +606,7 @@ void NavigatorImpl::RequestTransferURL(
params.should_replace_current_entry = should_replace_current_entry;
params.user_gesture = user_gesture;
- if (GetRenderManager(render_frame_host)->web_ui()) {
+ if (current_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
// automatically generated suggestions). We don't override other types
@@ -613,8 +614,7 @@ void NavigatorImpl::RequestTransferURL(
if (ui::PageTransitionCoreTypeIs(
params.transition, ui::PAGE_TRANSITION_LINK))
params.transition =
- GetRenderManager(render_frame_host)->web_ui()->
- GetLinkTransitionType();
+ current_render_frame_host->web_ui()->GetLinkTransitionType();
// Note also that we hide the referrer for Web UI pages. We don't really
// want web sites to see a referrer of "chrome://blah" (and some
« no previous file with comments | « content/browser/frame_host/frame_tree.cc ('k') | content/browser/frame_host/render_frame_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698