Commit 49235d02 authored by Miriam Polzer's avatar Miriam Polzer Committed by Commit Bot

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: default avatarKen Rockot <rockot@google.com>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#827302}
parent fd8172e5
...@@ -368,15 +368,14 @@ auto RunMathService(mojo::PendingReceiver<math::mojom::MathService> receiver) { ...@@ -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 services.Add(RunMathService);
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment