Commit c6fb80c2 authored by nasko@chromium.org's avatar nasko@chromium.org

Rename UpdateRendererStateForNavigate

The method name is a bit confusing, as it isn't updating any renderer. It makes a policy decision which RenderFrameHost should handle the navigation and returns it out. Dropping the "Renderer" part of the name makes it a bit better.

BUG=

Review URL: https://codereview.chromium.org/255293002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267128 0039d316-1c4b-4281-b951-d872f2087c98
parent c32eddfd
......@@ -164,8 +164,7 @@ RenderFrameHostImpl* RenderFrameHostManager::Navigate(
const NavigationEntryImpl& entry) {
TRACE_EVENT0("browser", "RenderFrameHostManager:Navigate");
// Create a pending RenderFrameHost to use for the navigation.
RenderFrameHostImpl* dest_render_frame_host =
UpdateRendererStateForNavigate(entry);
RenderFrameHostImpl* dest_render_frame_host = UpdateStateForNavigate(entry);
if (!dest_render_frame_host)
return NULL; // We weren't able to create a pending render frame host.
......@@ -1168,7 +1167,7 @@ void RenderFrameHostManager::ShutdownRenderFrameHostsInSiteInstance(
}
}
RenderFrameHostImpl* RenderFrameHostManager::UpdateRendererStateForNavigate(
RenderFrameHostImpl* RenderFrameHostManager::UpdateStateForNavigate(
const NavigationEntryImpl& entry) {
// If we are currently navigating cross-process, we want to get back to normal
// and then navigate as usual.
......
......@@ -395,7 +395,7 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver {
// Helper method to terminate the pending RenderViewHost.
void CancelPending();
RenderFrameHostImpl* UpdateRendererStateForNavigate(
RenderFrameHostImpl* UpdateStateForNavigate(
const NavigationEntryImpl& entry);
// Called when a renderer process is starting to close. We should not
......
......@@ -1065,7 +1065,7 @@ TEST_F(RenderFrameHostManagerTest, WebUI) {
EXPECT_EQ(kUrl, host->GetSiteInstance()->GetSiteURL());
// The Web UI is committed immediately because the RenderViewHost has not been
// used yet. UpdateRendererStateForNavigate() took the short cut path.
// used yet. UpdateStateForNavigate() took the short cut path.
EXPECT_FALSE(manager->pending_web_ui());
EXPECT_TRUE(manager->web_ui());
......
......@@ -92,7 +92,7 @@ bool CheckNavigationPolicyOnUI(GURL url, int process_id, int render_frame_id) {
// TODO(nasko): This check is very simplistic and is used temporarily only
// for --site-per-process. It should be updated to match the check performed
// by RenderFrameHostManager::UpdateRendererStateForNavigate.
// by RenderFrameHostManager::UpdateStateForNavigate.
return !SiteInstance::IsSameWebSite(
rfh->GetSiteInstance()->GetBrowserContext(),
rfh->GetSiteInstance()->GetSiteURL(), url);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment