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

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

Issue 2566583002: Change allowed bindings to be per RenderFrame instead of per RenderView. (Closed)
Patch Set: rebase Created 3 years, 10 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
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/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 : controller_(navigation_controller), 104 : controller_(navigation_controller),
105 delegate_(delegate) { 105 delegate_(delegate) {
106 } 106 }
107 107
108 NavigatorImpl::~NavigatorImpl() {} 108 NavigatorImpl::~NavigatorImpl() {}
109 109
110 // static 110 // static
111 void NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL( 111 void NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL(
112 RenderFrameHostImpl* render_frame_host, 112 RenderFrameHostImpl* render_frame_host,
113 const GURL& url) { 113 const GURL& url) {
114 int enabled_bindings = 114 int enabled_bindings = render_frame_host->GetEnabledBindings();
115 render_frame_host->render_view_host()->GetEnabledBindings();
116 bool is_allowed_in_web_ui_renderer = 115 bool is_allowed_in_web_ui_renderer =
117 WebUIControllerFactoryRegistry::GetInstance()->IsURLAcceptableForWebUI( 116 WebUIControllerFactoryRegistry::GetInstance()->IsURLAcceptableForWebUI(
118 render_frame_host->frame_tree_node() 117 render_frame_host->frame_tree_node()
119 ->navigator() 118 ->navigator()
120 ->GetController() 119 ->GetController()
121 ->GetBrowserContext(), 120 ->GetBrowserContext(),
122 url); 121 url);
123 if ((enabled_bindings & BINDINGS_POLICY_WEB_UI) && 122 if ((enabled_bindings & BINDINGS_POLICY_WEB_UI) &&
124 !is_allowed_in_web_ui_renderer) { 123 !is_allowed_in_web_ui_renderer) {
125 // Log the URL to help us diagnose any future failures of this CHECK. 124 // Log the URL to help us diagnose any future failures of this CHECK.
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 if (navigation_handle) 1267 if (navigation_handle)
1269 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); 1268 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID());
1270 1269
1271 controller_->SetPendingEntry(std::move(entry)); 1270 controller_->SetPendingEntry(std::move(entry));
1272 if (delegate_) 1271 if (delegate_)
1273 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); 1272 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL);
1274 } 1273 }
1275 } 1274 }
1276 1275
1277 } // namespace content 1276 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl_unittest.cc ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698