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( ...@@ -164,8 +164,7 @@ RenderFrameHostImpl* RenderFrameHostManager::Navigate(
const NavigationEntryImpl& entry) { const NavigationEntryImpl& entry) {
TRACE_EVENT0("browser", "RenderFrameHostManager:Navigate"); TRACE_EVENT0("browser", "RenderFrameHostManager:Navigate");
// Create a pending RenderFrameHost to use for the navigation. // Create a pending RenderFrameHost to use for the navigation.
RenderFrameHostImpl* dest_render_frame_host = RenderFrameHostImpl* dest_render_frame_host = UpdateStateForNavigate(entry);
UpdateRendererStateForNavigate(entry);
if (!dest_render_frame_host) if (!dest_render_frame_host)
return NULL; // We weren't able to create a pending render frame host. return NULL; // We weren't able to create a pending render frame host.
...@@ -1168,7 +1167,7 @@ void RenderFrameHostManager::ShutdownRenderFrameHostsInSiteInstance( ...@@ -1168,7 +1167,7 @@ void RenderFrameHostManager::ShutdownRenderFrameHostsInSiteInstance(
} }
} }
RenderFrameHostImpl* RenderFrameHostManager::UpdateRendererStateForNavigate( RenderFrameHostImpl* RenderFrameHostManager::UpdateStateForNavigate(
const NavigationEntryImpl& entry) { const NavigationEntryImpl& entry) {
// If we are currently navigating cross-process, we want to get back to normal // If we are currently navigating cross-process, we want to get back to normal
// and then navigate as usual. // and then navigate as usual.
......
...@@ -395,7 +395,7 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { ...@@ -395,7 +395,7 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver {
// Helper method to terminate the pending RenderViewHost. // Helper method to terminate the pending RenderViewHost.
void CancelPending(); void CancelPending();
RenderFrameHostImpl* UpdateRendererStateForNavigate( RenderFrameHostImpl* UpdateStateForNavigate(
const NavigationEntryImpl& entry); const NavigationEntryImpl& entry);
// Called when a renderer process is starting to close. We should not // Called when a renderer process is starting to close. We should not
......
...@@ -1065,7 +1065,7 @@ TEST_F(RenderFrameHostManagerTest, WebUI) { ...@@ -1065,7 +1065,7 @@ TEST_F(RenderFrameHostManagerTest, WebUI) {
EXPECT_EQ(kUrl, host->GetSiteInstance()->GetSiteURL()); EXPECT_EQ(kUrl, host->GetSiteInstance()->GetSiteURL());
// The Web UI is committed immediately because the RenderViewHost has not been // 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_FALSE(manager->pending_web_ui());
EXPECT_TRUE(manager->web_ui()); EXPECT_TRUE(manager->web_ui());
......
...@@ -92,7 +92,7 @@ bool CheckNavigationPolicyOnUI(GURL url, int process_id, int render_frame_id) { ...@@ -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 // 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 // for --site-per-process. It should be updated to match the check performed
// by RenderFrameHostManager::UpdateRendererStateForNavigate. // by RenderFrameHostManager::UpdateStateForNavigate.
return !SiteInstance::IsSameWebSite( return !SiteInstance::IsSameWebSite(
rfh->GetSiteInstance()->GetBrowserContext(), rfh->GetSiteInstance()->GetBrowserContext(),
rfh->GetSiteInstance()->GetSiteURL(), url); 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