Commit 0a51daeb authored by dcheng's avatar dcheng Committed by Commit bot

Remove implicit conversions from scoped_refptr to T* in content/browser/frame_host

This patch was generated by running the rewrite_scoped_refptr clang tool
on a Linux build.

BUG=110610

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

Cr-Commit-Position: refs/heads/master@{#291922}
parent 66919aa3
......@@ -72,7 +72,7 @@ bool CreateProxyForSiteInstance(FrameTreeNode* source_node,
if (source_node == node)
return true;
node->render_manager()->CreateRenderFrameProxy(instance);
node->render_manager()->CreateRenderFrameProxy(instance.get());
return true;
}
......
......@@ -501,8 +501,8 @@ void CheckNavigationEntryMatchLoadParams(
load_params.override_user_agent);
EXPECT_EQ(should_override, entry->GetIsOverridingUserAgent());
}
EXPECT_EQ(load_params.browser_initiated_post_data,
entry->GetBrowserInitiatedPostData());
EXPECT_EQ(load_params.browser_initiated_post_data.get(),
entry->GetBrowserInitiatedPostData());
EXPECT_EQ(load_params.transferred_global_request_id,
entry->transferred_global_request_id());
}
......
......@@ -1439,7 +1439,7 @@ RenderFrameHostImpl* RenderFrameHostManager::UpdateStateForNavigate(
const NavigationEntry* current_entry =
delegate_->GetLastCommittedNavigationEntryForRenderManager();
if (new_instance != current_instance) {
if (new_instance.get() != current_instance) {
// New SiteInstance: create a pending RFH to navigate.
DCHECK(!cross_navigation_pending_);
......@@ -1451,7 +1451,7 @@ RenderFrameHostImpl* RenderFrameHostManager::UpdateStateForNavigate(
// not have its bindings set appropriately.
SetPendingWebUI(entry);
CreateRenderFrameHostForNewSiteInstance(
current_instance, new_instance, frame_tree_node_->IsMainFrame());
current_instance, new_instance.get(), frame_tree_node_->IsMainFrame());
if (!pending_render_frame_host_.get()) {
return NULL;
}
......@@ -1519,7 +1519,7 @@ RenderFrameHostImpl* RenderFrameHostManager::UpdateStateForNavigate(
// original site). In that case, we have a proxy for the current RFH but
// haven't deleted it yet. The new navigation will swap it back in, so we can
// delete the proxy.
DeleteRenderFrameProxyHost(new_instance);
DeleteRenderFrameProxyHost(new_instance.get());
if (ShouldReuseWebUI(current_entry, &entry)) {
pending_web_ui_.reset();
......
......@@ -398,7 +398,7 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest,
// If it navigates away to another process, the original window should
// still be able to close it (using a cross-process close message).
NavigateToURL(new_shell, cross_site_url);
EXPECT_EQ(new_site_instance,
EXPECT_EQ(new_site_instance.get(),
new_shell->web_contents()->GetSiteInstance());
WebContentsDestroyedWatcher close_watcher(new_shell->web_contents());
EXPECT_TRUE(ExecuteScriptAndExtractBool(
......@@ -573,7 +573,7 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest,
WaitForLoadStop(new_contents);
EXPECT_EQ("/files/title2.html", new_contents->GetLastCommittedURL().path());
NavigateToURL(new_shell2, test_server()->GetURL("files/post_message.html"));
EXPECT_EQ(orig_site_instance, new_contents->GetSiteInstance());
EXPECT_EQ(orig_site_instance.get(), new_contents->GetSiteInstance());
RenderFrameHostManager* new_manager =
static_cast<WebContentsImpl*>(new_contents)->GetRenderManagerForTesting();
......@@ -1272,7 +1272,8 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest,
new_shell->web_contents()->GetLastCommittedURL().path());
// Should have the same SiteInstance.
EXPECT_EQ(orig_site_instance, new_shell->web_contents()->GetSiteInstance());
EXPECT_EQ(orig_site_instance.get(),
new_shell->web_contents()->GetSiteInstance());
// 2. Send the second tab to a different process.
NavigateToURL(new_shell, GetCrossSiteURL("files/title1.html"));
......@@ -1287,7 +1288,8 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest,
WaitForLoadStop(shell()->web_contents());
EXPECT_EQ(GetCrossSiteURL("files/title1.html"),
shell()->web_contents()->GetLastCommittedURL());
EXPECT_EQ(new_site_instance, shell()->web_contents()->GetSiteInstance());
EXPECT_EQ(new_site_instance.get(),
shell()->web_contents()->GetSiteInstance());
}
// Ensure that renderer-side debug URLs do not cause a process swap, since they
......
......@@ -53,7 +53,8 @@ void RenderFrameProxyHost::SetChildRWHView(RenderWidgetHostView* view) {
}
RenderViewHostImpl* RenderFrameProxyHost::GetRenderViewHost() {
return frame_tree_node_->frame_tree()->GetRenderViewHost(site_instance_);
return frame_tree_node_->frame_tree()->GetRenderViewHost(
site_instance_.get());
}
scoped_ptr<RenderFrameHostImpl> RenderFrameProxyHost::PassFrameHostOwnership() {
......@@ -94,16 +95,17 @@ bool RenderFrameProxyHost::InitRenderFrameProxy() {
int parent_routing_id = MSG_ROUTING_NONE;
if (frame_tree_node_->parent()) {
parent_routing_id = frame_tree_node_->parent()->render_manager()->
GetRoutingIdForSiteInstance(site_instance_);
parent_routing_id = frame_tree_node_->parent()
->render_manager()
->GetRoutingIdForSiteInstance(site_instance_.get());
CHECK_NE(parent_routing_id, MSG_ROUTING_NONE);
}
Send(new FrameMsg_NewFrameProxy(
routing_id_,
parent_routing_id,
frame_tree_node_->frame_tree()->GetRenderViewHost(
site_instance_)->GetRoutingID()));
Send(new FrameMsg_NewFrameProxy(routing_id_,
parent_routing_id,
frame_tree_node_->frame_tree()
->GetRenderViewHost(site_instance_.get())
->GetRoutingID()));
return true;
}
......
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