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

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

Issue 1229133005: Fix for single-process WebUI transition CHECK failure. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/logging.h" 10 #include "base/logging.h"
(...skipping 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 switches::kEnableBrowserSideNavigation)) { 1751 switches::kEnableBrowserSideNavigation)) {
1752 dest_web_ui = 1752 dest_web_ui =
1753 should_reuse_web_ui_ ? web_ui_.get() : speculative_web_ui_.get(); 1753 should_reuse_web_ui_ ? web_ui_.get() : speculative_web_ui_.get();
1754 } else { 1754 } else {
1755 dest_web_ui = pending_web_ui(); 1755 dest_web_ui = pending_web_ui();
1756 } 1756 }
1757 if (dest_web_ui && !render_view_host->GetProcess()->IsForGuestsOnly()) { 1757 if (dest_web_ui && !render_view_host->GetProcess()->IsForGuestsOnly()) {
1758 render_view_host->AllowBindings(dest_web_ui->GetBindings()); 1758 render_view_host->AllowBindings(dest_web_ui->GetBindings());
1759 } else { 1759 } else {
1760 // Ensure that we don't create an unprivileged RenderView in a WebUI-enabled 1760 // Ensure that we don't create an unprivileged RenderView in a WebUI-enabled
1761 // process unless it's swapped out. 1761 // process unless it's swapped out or we run in single-process mode.
1762 if (render_view_host->is_active()) { 1762 if (render_view_host->is_active()
1763 && !RenderProcessHost::run_renderer_in_process()) {
1763 CHECK(!ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( 1764 CHECK(!ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings(
1764 render_view_host->GetProcess()->GetID())); 1765 render_view_host->GetProcess()->GetID()));
1765 } 1766 }
1766 } 1767 }
1767 1768
1768 return delegate_->CreateRenderViewForRenderManager( 1769 return delegate_->CreateRenderViewForRenderManager(
1769 render_view_host, 1770 render_view_host,
1770 opener_route_id, 1771 opener_route_id,
1771 proxy_routing_id, 1772 proxy_routing_id,
1772 frame_tree_node_->current_replication_state(), 1773 frame_tree_node_->current_replication_state(),
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
2323 frame_tree->root()->render_manager()-> 2324 frame_tree->root()->render_manager()->
2324 CreateRenderFrame(instance, nullptr, opener_route_id, 2325 CreateRenderFrame(instance, nullptr, opener_route_id,
2325 CREATE_RF_FOR_MAIN_FRAME_NAVIGATION | 2326 CREATE_RF_FOR_MAIN_FRAME_NAVIGATION |
2326 CREATE_RF_SWAPPED_OUT | CREATE_RF_HIDDEN, 2327 CREATE_RF_SWAPPED_OUT | CREATE_RF_HIDDEN,
2327 &render_view_routing_id); 2328 &render_view_routing_id);
2328 } 2329 }
2329 return render_view_routing_id; 2330 return render_view_routing_id;
2330 } 2331 }
2331 2332
2332 } // namespace content 2333 } // 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