build: lock chromium major to 78 on 7-0-x (#19552)

* build: lock chromium major to 78 on 7-0-x

* chore: update patches

* fix geometry.mojom

* Adopt more inclusive language in //net

https://chromium-review.googlesource.com/c/chromium/src/+/1718348

* [mojo] Introduce ServiceFactory API

https://chromium-review.googlesource.com/c/chromium/src/+/1717474
This commit is contained in:
Samuel Attard
2019-08-02 12:41:41 -07:00
committed by John Kleinschmidt
parent c6061cce41
commit 9822953d31
24 changed files with 68 additions and 65 deletions

View File

@@ -13,6 +13,7 @@
#include "content/public/common/service_manager_connection.h"
#include "content/public/common/simple_connection_filter.h"
#include "content/public/utility/utility_thread.h"
#include "mojo/public/cpp/bindings/service_factory.h"
#include "services/proxy_resolver/proxy_resolver_factory_impl.h"
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h"
#include "services/service_manager/public/cpp/service.h"
@@ -42,6 +43,13 @@ void RunServiceAsyncThenTerminateProcess(
base::BindOnce([] { content::UtilityThread::Get()->ReleaseProcess(); }));
}
auto RunProxyResolver(
mojo::PendingReceiver<proxy_resolver::mojom::ProxyResolverFactory>
receiver) {
return std::make_unique<proxy_resolver::ProxyResolverFactoryImpl>(
std::move(receiver));
}
} // namespace
AtomContentUtilityClient::AtomContentUtilityClient() : elevated_(false) {
@@ -111,14 +119,9 @@ bool AtomContentUtilityClient::HandleServiceRequest(
return false;
}
void AtomContentUtilityClient::RunIOThreadService(
mojo::GenericPendingReceiver* receiver) {
if (auto factory_receiver =
receiver->As<proxy_resolver::mojom::ProxyResolverFactory>()) {
static base::NoDestructor<proxy_resolver::ProxyResolverFactoryImpl> factory(
std::move(factory_receiver));
return;
}
mojo::ServiceFactory* AtomContentUtilityClient::GetIOThreadServiceFactory() {
static base::NoDestructor<mojo::ServiceFactory> factory{RunProxyResolver};
return factory.get();
}
std::unique_ptr<service_manager::Service>

View File

@@ -29,7 +29,7 @@ class AtomContentUtilityClient : public content::ContentUtilityClient {
bool HandleServiceRequest(
const std::string& service_name,
service_manager::mojom::ServiceRequest request) override;
void RunIOThreadService(mojo::GenericPendingReceiver* receiver) override;
mojo::ServiceFactory* GetIOThreadServiceFactory() override;
private:
std::unique_ptr<service_manager::Service> MaybeCreateMainThreadService(