New issue
Advanced search Search tips

Issue 775792 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Introduce BinderRegistryWithArgs<url::Origin, ...>

Project Member Reported by sa...@chromium.org, Oct 18 2017

Issue description

Mojo interface implementations that rely on the security principal (origin, storage partition etc.) should use a BinderRegistry parametrized with that information rather than the current ad-hoc approach of currying-in either the RenderFrameHost or information obtained from the RenderFrameHost.

This bug tracks figuring out which sets of parameters to provide and to introduce BinderRegistryWithArgs<> for each set. Some possibilities:

BinderRegistryWithArgs<RenderFrameHost*>
BinderRegistryWithArgs<const url::Origin&, StoragePartition*, BrowserContext*, ...>

See also issue 734722 for plans for adding an isolation principal.
 
Labels: -Pri-3 Pri-2
Steps:
- Short Design Doc
- Code & Test
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/faf9a403107325c056c4588bc227cc541b8621f2

commit faf9a403107325c056c4588bc227cc541b8621f2
Author: Sam McNally <sammc@chromium.org>
Date: Tue Oct 31 03:06:31 2017

Add a shared BinderRegistry for web workers.

Add content::BindWorkerInterface(), a function to bind an interface
requested by a web worker. BindWorkerInterface() forwards to a
singleton WorkerInterfaceBinders, responsible for registering interface
binders on and dispatching interface requests using a
BinderRegistryWithArgs<RenderProcessHost*, const url::Origin&>. These
BinderRegistryWithArgs arg types are temporary until
 https://crbug.com/775792  determines the appropriate longer-term arg
types.

To support worker-exposed interfaces implemented by the embedder, add
ContentBrowserClient::BindInterfaceRequestFromWorker(). Forward requests
not handled at the content layer to BindInterfaceRequestFromWorker().

Migrate {Barcode,Face,Text}Detector, BudgetService and Mojo bindings to
use the worker InterfaceProviders. Update MojoInterfaceInterceptor to
intercept interface requests sent on the worker InterfaceProviders
instead of the process-wide connector. These APIs rely on
MojoInterfaceInterceptor for testing so are migrated together.

Bug:  734210 ,  775792 
Change-Id: I7add53ac091f5c5bfcdeb67c935fb138e0b99173
Reviewed-on: https://chromium-review.googlesource.com/725202
Commit-Queue: Sam McNally <sammc@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512727}
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/chrome/browser/budget_service/budget_service_impl.cc
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/chrome/browser/budget_service/budget_service_impl.h
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/chrome/browser/chrome_content_browser_client.h
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/chrome/browser/chrome_content_browser_manifest_overlay.json
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/browser/BUILD.gn
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/browser/dedicated_worker/dedicated_worker_host.cc
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/browser/service_worker/service_worker_provider_host.cc
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/browser/shared_worker/shared_worker_host.cc
[add] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/browser/worker_interface_binders.cc
[add] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/browser/worker_interface_binders.h
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/public/browser/content_browser_client.h
[delete] https://crrev.com/a61604478fbacd5d6bf7b7c600578d5970b95417/third_party/WebKit/LayoutTests/mojo/intercept-interface-for-worker.html
[delete] https://crrev.com/a61604478fbacd5d6bf7b7c600578d5970b95417/third_party/WebKit/LayoutTests/mojo/resources/expect-test-reply.js
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/core/mojo/Mojo.cpp
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/core/mojo/test/MojoInterfaceInterceptor.cpp
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/modules/budget/NavigatorBudget.cpp
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/modules/budget/NavigatorBudget.h
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/modules/budget/NavigatorBudget.idl
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/modules/budget/WorkerNavigatorBudget.cpp
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/modules/shapedetection/TextDetector.cpp

Comment 3 by noel@chromium.org, Feb 5 2018

Status: WontFix (was: Assigned)
All this work was rolled up into the design of Web Interface Broker (WIB).  There is no need to for half-way house bug anymore: WIB subsumed it.

Sign in to add a comment