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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 298133002: Don't ensure, in single-process mode, that WebUI render views are the only ones in the process, as … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased to master. Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_frame_host_manager.h" 5 #include "content/browser/frame_host/render_frame_host_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 if (render_view_host->IsRenderViewLive()) 1247 if (render_view_host->IsRenderViewLive())
1248 return true; 1248 return true;
1249 1249
1250 // If the pending navigation is to a WebUI and the RenderView is not in a 1250 // If the pending navigation is to a WebUI and the RenderView is not in a
1251 // guest process, tell the RenderViewHost about any bindings it will need 1251 // guest process, tell the RenderViewHost about any bindings it will need
1252 // enabled. 1252 // enabled.
1253 if (pending_web_ui() && !render_view_host->GetProcess()->IsIsolatedGuest()) { 1253 if (pending_web_ui() && !render_view_host->GetProcess()->IsIsolatedGuest()) {
1254 render_view_host->AllowBindings(pending_web_ui()->GetBindings()); 1254 render_view_host->AllowBindings(pending_web_ui()->GetBindings());
1255 } else { 1255 } else {
1256 // Ensure that we don't create an unprivileged RenderView in a WebUI-enabled 1256 // Ensure that we don't create an unprivileged RenderView in a WebUI-enabled
1257 // process unless it's swapped out. 1257 // process unless it's swapped out or we run in single-process mode.
1258 if (render_view_host->is_active()) { 1258 if (render_view_host->is_active()
1259 && !RenderProcessHost::run_renderer_in_process()) {
1259 CHECK(!ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( 1260 CHECK(!ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings(
1260 render_view_host->GetProcess()->GetID())); 1261 render_view_host->GetProcess()->GetID()));
1261 } 1262 }
1262 } 1263 }
1263 1264
1264 return delegate_->CreateRenderViewForRenderManager(render_view_host, 1265 return delegate_->CreateRenderViewForRenderManager(render_view_host,
1265 opener_route_id, 1266 opener_route_id,
1266 proxy_routing_id, 1267 proxy_routing_id,
1267 for_main_frame_navigation); 1268 for_main_frame_navigation);
1268 } 1269 }
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 void RenderFrameHostManager::DeleteRenderFrameProxyHost( 1741 void RenderFrameHostManager::DeleteRenderFrameProxyHost(
1741 SiteInstance* instance) { 1742 SiteInstance* instance) {
1742 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); 1743 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId());
1743 if (iter != proxy_hosts_.end()) { 1744 if (iter != proxy_hosts_.end()) {
1744 delete iter->second; 1745 delete iter->second;
1745 proxy_hosts_.erase(iter); 1746 proxy_hosts_.erase(iter);
1746 } 1747 }
1747 } 1748 }
1748 1749
1749 } // namespace content 1750 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698