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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2947413002: Restrict CM API interface request and message dispatch. (Closed)
Patch Set: Address nit from clamy@. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index d15b46580d7ac3baa908bd5adccf85107da9c274..1f3d42813792b6bcaae51cc8408eb9777c7f3e80 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -924,9 +924,11 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
void RenderFrameHostImpl::OnAssociatedInterfaceRequest(
const std::string& interface_name,
mojo::ScopedInterfaceEndpointHandle handle) {
+ ContentBrowserClient* browser_client = GetContentClient()->browser();
if (associated_registry_->CanBindRequest(interface_name)) {
associated_registry_->BindRequest(interface_name, std::move(handle));
- } else {
+ } else if (!browser_client->BindAssociatedInterfaceRequestFromFrame(
+ this, interface_name, &handle)) {
delegate_->OnAssociatedInterfaceRequest(this, interface_name,
std::move(handle));
}

Powered by Google App Engine
This is Rietveld 408576698