Update "Hooking Up the Service Implementation"
Looks like service.cc now registers new out-of-process services differently. Changing the code snippet accordingly. Bug: None Change-Id: Iac9b87d5f62006e24a48d3f8fa3feff3ab1fcaad Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2536433 Auto-Submit: Miriam Polzer <mpolzer@google.com> Reviewed-by: Ken Rockot <rockot@google.com> Commit-Queue: Ken Rockot <rockot@google.com> Cr-Commit-Position: refs/heads/master@{#827302}
This commit is contained in:

committed by
Commit Bot

parent
fd8172e5c9
commit
49235d024d
@ -368,15 +368,14 @@ auto RunMathService(mojo::PendingReceiver<math::mojom::MathService> receiver) {
|
||||
return std::make_unique<math::MathService>(std::move(receiver));
|
||||
}
|
||||
|
||||
mojo::ServiceFactory* GetMainThreadServiceFactory() {
|
||||
// Existing factories...
|
||||
static base::NoDestructor<mojo::ServiceFactory> factory {
|
||||
RunFilePatcher,
|
||||
RunUnzipper,
|
||||
void RegisterMainThreadServices(mojo::ServiceFactory& services) {
|
||||
// Existing services...
|
||||
services.Add(RunFilePatcher);
|
||||
services.Add(RunUnzipper);
|
||||
|
||||
// We add our own factory to this list
|
||||
RunMathService,
|
||||
//...
|
||||
// We add our own factory to this list
|
||||
services.Add(RunMathService);
|
||||
//...
|
||||
```
|
||||
|
||||
With this done, it is now possible for the browser process to launch new
|
||||
|
Reference in New Issue
Block a user