0

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:
Miriam Polzer
2020-11-13 17:19:29 +00:00
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)); return std::make_unique<math::MathService>(std::move(receiver));
} }
mojo::ServiceFactory* GetMainThreadServiceFactory() { void RegisterMainThreadServices(mojo::ServiceFactory& services) {
// Existing factories... // Existing services...
static base::NoDestructor<mojo::ServiceFactory> factory { services.Add(RunFilePatcher);
RunFilePatcher, services.Add(RunUnzipper);
RunUnzipper,
// We add our own factory to this list // We add our own factory to this list
RunMathService, services.Add(RunMathService);
//... //...
``` ```
With this done, it is now possible for the browser process to launch new With this done, it is now possible for the browser process to launch new