Commit e856849f authored by Ken Rockot's avatar Ken Rockot Committed by Chromium LUCI CQ

Move ServiceManagerConnection into //chromecast

Also delete a bunch of dead code within.

Bug: 977637
Change-Id: Ieeb45f102332bf06568ab83b7183769b3da2fdf2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2568612
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Reviewed-by: default avatarSean Topping <seantopping@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834485}
parent eedfa790
......@@ -159,6 +159,7 @@ cast_source_set("browser_base") {
"service/cast_service_simple.h",
"service_connector.cc",
"service_connector.h",
"service_manager_connection.cc",
"service_manager_connection.h",
"service_manager_context.cc",
"service_manager_context.h",
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/common/service_manager/service_manager_connection_impl.h"
#include "chromecast/browser/service_manager_connection.h"
#include <map>
#include <queue>
......@@ -10,15 +10,12 @@
#include <vector>
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/compiler_specific.h"
#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/no_destructor.h"
#include "base/task/current_thread.h"
#include "base/thread_annotations.h"
#include "base/threading/thread_checker.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/system/message_pipe.h"
......@@ -27,20 +24,21 @@
#include "services/service_manager/public/mojom/constants.mojom.h"
#include "services/service_manager/public/mojom/interface_provider.mojom.h"
namespace content {
namespace chromecast {
namespace {
base::LazyInstance<std::unique_ptr<ServiceManagerConnection>>::Leaky
g_connection_for_process = LAZY_INSTANCE_INITIALIZER;
ServiceManagerConnection::Factory* service_manager_connection_factory = nullptr;
std::unique_ptr<ServiceManagerConnection>& GetConnectionForProcess() {
static base::NoDestructor<std::unique_ptr<ServiceManagerConnection>>
connection;
return *connection;
}
} // namespace
// A ref-counted object which owns the IO thread state of a
// ServiceManagerConnectionImpl. This includes Service and ServiceFactory
// ServiceManagerConnection. This includes Service and ServiceFactory
// bindings.
class ServiceManagerConnectionImpl::IOThreadContext
class ServiceManagerConnection::IOThreadContext
: public base::RefCountedThreadSafe<IOThreadContext>,
public service_manager::Service {
public:
......@@ -56,28 +54,15 @@ class ServiceManagerConnectionImpl::IOThreadContext
io_thread_checker_.DetachFromThread();
}
void SetDefaultServiceRequestHandler(
const ServiceManagerConnection::DefaultServiceRequestHandler& handler) {
DCHECK(!started_);
default_request_handler_ = handler;
}
// Safe to call from any thread.
void Start(base::OnceClosure stop_callback) {
void Start() {
DCHECK(!started_);
started_ = true;
callback_task_runner_ = base::ThreadTaskRunnerHandle::Get();
stop_callback_ = std::move(stop_callback);
io_task_runner_->PostTask(
FROM_HERE, base::BindOnce(&IOThreadContext::StartOnIOThread, this));
}
void Stop() {
io_task_runner_->PostTask(
FROM_HERE, base::BindOnce(&IOThreadContext::StopOnIOThread, this));
}
// Safe to call from whichever thread called Start() (or may have called
// Start()). Must be called before IO thread shutdown.
void ShutDown() {
......@@ -89,23 +74,6 @@ class ServiceManagerConnectionImpl::IOThreadContext
DCHECK(posted);
}
void AddServiceRequestHandler(const std::string& name,
const ServiceRequestHandler& handler) {
AddServiceRequestHandlerWithCallback(
name,
base::BindRepeating(&WrapServiceRequestHandlerNoCallback, handler));
}
void AddServiceRequestHandlerWithCallback(
const std::string& name,
const ServiceRequestHandlerWithCallback& handler) {
io_task_runner_->PostTask(
FROM_HERE,
base::BindOnce(&ServiceManagerConnectionImpl::IOThreadContext::
AddServiceRequestHandlerOnIoThread,
this, name, handler));
}
private:
friend class base::RefCountedThreadSafe<IOThreadContext>;
......@@ -147,14 +115,6 @@ class ServiceManagerConnectionImpl::IOThreadContext
~IOThreadContext() override {}
static void WrapServiceRequestHandlerNoCallback(
const ServiceRequestHandler& handler,
mojo::PendingReceiver<service_manager::mojom::Service> receiver,
CreatePackagedServiceInstanceCallback callback) {
handler.Run(std::move(receiver));
std::move(callback).Run(base::GetCurrentProcId());
}
void StartOnIOThread() {
// Should bind |io_thread_checker_| to the context's thread.
DCHECK(io_thread_checker_.CalledOnValidThread());
......@@ -168,10 +128,6 @@ class ServiceManagerConnectionImpl::IOThreadContext
new MessageLoopObserver(weak_factory_.GetWeakPtr());
}
void StopOnIOThread() {
request_handlers_.clear();
}
void ShutDownOnIOThread() {
DCHECK(io_thread_checker_.CalledOnValidThread());
......@@ -191,17 +147,6 @@ class ServiceManagerConnectionImpl::IOThreadContext
scoped_refptr<IOThreadContext> keepalive(this);
service_receiver_.reset();
StopOnIOThread();
}
void AddServiceRequestHandlerOnIoThread(
const std::string& name,
const ServiceRequestHandlerWithCallback& handler) {
DCHECK(io_thread_checker_.CalledOnValidThread());
auto result = request_handlers_.insert(std::make_pair(name, handler));
DCHECK(result.second) << "ServiceRequestHandler for " << name
<< " already exists.";
}
/////////////////////////////////////////////////////////////////////////////
......@@ -211,37 +156,9 @@ class ServiceManagerConnectionImpl::IOThreadContext
const std::string& interface_name,
mojo::ScopedMessagePipeHandle interface_pipe) override {}
void CreatePackagedServiceInstance(
const std::string& service_name,
mojo::PendingReceiver<service_manager::mojom::Service> receiver,
CreatePackagedServiceInstanceCallback callback) override {
DCHECK(io_thread_checker_.CalledOnValidThread());
auto it = request_handlers_.find(service_name);
if (it == request_handlers_.end()) {
if (default_request_handler_) {
callback_task_runner_->PostTask(
FROM_HERE, base::BindOnce(default_request_handler_, service_name,
std::move(receiver)));
} else {
LOG(ERROR) << "Can't create service " << service_name
<< ". No handler found.";
}
std::move(callback).Run(base::nullopt);
} else {
it->second.Run(std::move(receiver), std::move(callback));
}
}
void OnDisconnected() override {
callback_task_runner_->PostTask(FROM_HERE, std::move(stop_callback_));
}
base::ThreadChecker io_thread_checker_;
bool started_ = false;
ServiceManagerConnection::DefaultServiceRequestHandler
default_request_handler_;
// Temporary state established on construction and consumed on the IO thread
// once the connection is started.
mojo::PendingReceiver<service_manager::mojom::Service>
......@@ -252,66 +169,43 @@ class ServiceManagerConnectionImpl::IOThreadContext
// TaskRunner on which to run our owner's callbacks, i.e. the ones passed to
// Start().
scoped_refptr<base::SequencedTaskRunner> callback_task_runner_;
// Callback to run if the service is stopped by the service manager.
base::OnceClosure stop_callback_;
std::unique_ptr<service_manager::ServiceReceiver> service_receiver_;
// Not owned.
MessageLoopObserver* message_loop_observer_ = nullptr;
std::map<std::string, ServiceRequestHandlerWithCallback> request_handlers_;
base::WeakPtrFactory<IOThreadContext> weak_factory_{this};
DISALLOW_COPY_AND_ASSIGN(IOThreadContext);
};
////////////////////////////////////////////////////////////////////////////////
// ServiceManagerConnection, public:
// static
void ServiceManagerConnection::SetForProcess(
std::unique_ptr<ServiceManagerConnection> connection) {
DCHECK(!g_connection_for_process.Get());
g_connection_for_process.Get() = std::move(connection);
DCHECK(!GetConnectionForProcess());
GetConnectionForProcess() = std::move(connection);
}
// static
ServiceManagerConnection* ServiceManagerConnection::GetForProcess() {
return g_connection_for_process.Get().get();
return GetConnectionForProcess().get();
}
// static
void ServiceManagerConnection::DestroyForProcess() {
// This joins the service manager controller thread.
g_connection_for_process.Get().reset();
}
// static
void ServiceManagerConnection::SetFactoryForTest(Factory* factory) {
DCHECK(!g_connection_for_process.Get());
service_manager_connection_factory = factory;
GetConnectionForProcess().reset();
}
// static
std::unique_ptr<ServiceManagerConnection> ServiceManagerConnection::Create(
mojo::PendingReceiver<service_manager::mojom::Service> receiver,
scoped_refptr<base::SequencedTaskRunner> io_task_runner) {
if (service_manager_connection_factory)
return service_manager_connection_factory->Run();
return std::make_unique<ServiceManagerConnectionImpl>(std::move(receiver),
io_task_runner);
return std::make_unique<ServiceManagerConnection>(std::move(receiver),
io_task_runner);
}
ServiceManagerConnection::~ServiceManagerConnection() {}
////////////////////////////////////////////////////////////////////////////////
// ServiceManagerConnectionImpl, public:
ServiceManagerConnectionImpl::ServiceManagerConnectionImpl(
ServiceManagerConnection::ServiceManagerConnection(
mojo::PendingReceiver<service_manager::mojom::Service> receiver,
scoped_refptr<base::SequencedTaskRunner> io_task_runner) {
mojo::PendingReceiver<service_manager::mojom::Connector> connector_receiver;
......@@ -320,59 +214,16 @@ ServiceManagerConnectionImpl::ServiceManagerConnectionImpl(
std::move(connector_receiver));
}
ServiceManagerConnectionImpl::~ServiceManagerConnectionImpl() {
ServiceManagerConnection::~ServiceManagerConnection() {
context_->ShutDown();
}
////////////////////////////////////////////////////////////////////////////////
// ServiceManagerConnectionImpl, ServiceManagerConnection implementation:
void ServiceManagerConnectionImpl::Start() {
context_->Start(
base::BindOnce(&ServiceManagerConnectionImpl::OnConnectionLost,
weak_factory_.GetWeakPtr()));
}
void ServiceManagerConnectionImpl::Stop() {
context_->Stop();
void ServiceManagerConnection::Start() {
context_->Start();
}
service_manager::Connector* ServiceManagerConnectionImpl::GetConnector() {
service_manager::Connector* ServiceManagerConnection::GetConnector() {
return connector_.get();
}
void ServiceManagerConnectionImpl::SetConnectionLostClosure(
base::OnceClosure closure) {
connection_lost_handler_ = std::move(closure);
}
void ServiceManagerConnectionImpl::AddServiceRequestHandler(
const std::string& name,
const ServiceRequestHandler& handler) {
context_->AddServiceRequestHandler(name, handler);
}
void ServiceManagerConnectionImpl::AddServiceRequestHandlerWithCallback(
const std::string& name,
const ServiceRequestHandlerWithCallback& handler) {
context_->AddServiceRequestHandlerWithCallback(name, handler);
}
void ServiceManagerConnectionImpl::SetDefaultServiceRequestHandler(
const DefaultServiceRequestHandler& handler) {
context_->SetDefaultServiceRequestHandler(handler);
}
void ServiceManagerConnectionImpl::OnConnectionLost() {
if (!connection_lost_handler_.is_null())
std::move(connection_lost_handler_).Run();
}
void ServiceManagerConnectionImpl::GetInterface(
service_manager::mojom::InterfaceProvider* provider,
const std::string& interface_name,
mojo::ScopedMessagePipeHandle request_handle) {
provider->GetInterface(interface_name, std::move(request_handle));
}
} // namespace content
} // namespace chromecast
......@@ -5,13 +5,82 @@
#ifndef CHROMECAST_BROWSER_SERVICE_MANAGER_CONNECTION_H_
#define CHROMECAST_BROWSER_SERVICE_MANAGER_CONNECTION_H_
#include "content/public/common/service_manager_connection.h"
#include <memory>
#include <string>
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "base/sequenced_task_runner.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "services/service_manager/public/cpp/identity.h"
#include "services/service_manager/public/cpp/service.h"
#include "services/service_manager/public/mojom/connector.mojom-forward.h"
#include "services/service_manager/public/mojom/service.mojom-forward.h"
namespace service_manager {
class Connector;
}
namespace chromecast {
// Temporary alias until the downstream internal repository can update its
// #includes to reference this file rather than the one in Content.
using ServiceManagerConnection = content::ServiceManagerConnection;
// Encapsulates a connection to a //services/service_manager.
// Access a global instance on the thread the ServiceContext was bound by
// calling Holder::Get().
// Clients can add service_manager::Service implementations whose exposed
// interfaces
// will be exposed to inbound connections to this object's Service.
// Alternatively clients can define named services that will be constructed when
// requests for those service names are received.
class ServiceManagerConnection {
public:
ServiceManagerConnection(
mojo::PendingReceiver<service_manager::mojom::Service> receiver,
scoped_refptr<base::SequencedTaskRunner> io_task_runner);
ServiceManagerConnection(const ServiceManagerConnection&) = delete;
ServiceManagerConnection& operator=(const ServiceManagerConnection) = delete;
~ServiceManagerConnection();
// Stores an instance of |connection| in TLS for the current process. Must be
// called on the thread the connection was created on.
static void SetForProcess(
std::unique_ptr<ServiceManagerConnection> connection);
// Returns the per-process instance, or nullptr if the Service Manager
// connection has not yet been bound. Must be called on the thread the
// connection was created on.
static ServiceManagerConnection* GetForProcess();
// Destroys the per-process instance. Must be called on the thread the
// connection was created on.
static void DestroyForProcess();
// Creates a ServiceManagerConnection from |request|. The connection binds
// its interfaces and accept new connections on |io_task_runner| only. Note
// that no incoming connections are accepted until Start() is called.
static std::unique_ptr<ServiceManagerConnection> Create(
mojo::PendingReceiver<service_manager::mojom::Service> receiver,
scoped_refptr<base::SequencedTaskRunner> io_task_runner);
// Begins accepting incoming connections.
void Start();
// Returns the service_manager::Connector received via this connection's
// Service
// implementation. Use this to initiate connections as this object's Identity.
service_manager::Connector* GetConnector();
private:
class IOThreadContext;
void OnConnectionLost();
void GetInterface(service_manager::mojom::InterfaceProvider* provider,
const std::string& interface_name,
mojo::ScopedMessagePipeHandle request_handle);
std::unique_ptr<service_manager::Connector> connector_;
scoped_refptr<IOThreadContext> context_;
base::WeakPtrFactory<ServiceManagerConnection> weak_factory_{this};
};
} // namespace chromecast
......
......@@ -134,8 +134,6 @@ source_set("common") {
"pepper_renderer_instance_data.h",
"process_type.cc",
"resource_messages.h",
"service_manager/service_manager_connection_impl.cc",
"service_manager/service_manager_connection_impl.h",
"service_worker/service_worker_loader_helpers.cc",
"service_worker/service_worker_loader_helpers.h",
"service_worker/service_worker_utils.cc",
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_COMMON_SERVICE_MANAGER_SERVICE_MANAGER_CONNECTION_IMPL_H_
#define CONTENT_COMMON_SERVICE_MANAGER_SERVICE_MANAGER_CONNECTION_IMPL_H_
#include <memory>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/sequenced_task_runner.h"
#include "content/common/content_export.h"
#include "content/public/common/service_manager_connection.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/system/message_pipe.h"
#include "services/service_manager/public/cpp/identity.h"
#include "services/service_manager/public/mojom/service.mojom.h"
namespace service_manager {
class Connector;
}
namespace content {
class CONTENT_EXPORT ServiceManagerConnectionImpl
: public ServiceManagerConnection {
public:
explicit ServiceManagerConnectionImpl(
mojo::PendingReceiver<service_manager::mojom::Service> receiver,
scoped_refptr<base::SequencedTaskRunner> io_task_runner);
~ServiceManagerConnectionImpl() override;
private:
class IOThreadContext;
// ServiceManagerConnection:
void Start() override;
void Stop() override;
service_manager::Connector* GetConnector() override;
void SetConnectionLostClosure(base::OnceClosure closure) override;
void AddServiceRequestHandler(
const std::string& name,
const ServiceRequestHandler& handler) override;
void AddServiceRequestHandlerWithCallback(
const std::string& name,
const ServiceRequestHandlerWithCallback& handler) override;
void SetDefaultServiceRequestHandler(
const DefaultServiceRequestHandler& handler) override;
void OnConnectionLost();
void GetInterface(service_manager::mojom::InterfaceProvider* provider,
const std::string& interface_name,
mojo::ScopedMessagePipeHandle request_handle);
std::unique_ptr<service_manager::Connector> connector_;
scoped_refptr<IOThreadContext> context_;
base::OnceClosure connection_lost_handler_;
base::WeakPtrFactory<ServiceManagerConnectionImpl> weak_factory_{this};
DISALLOW_COPY_AND_ASSIGN(ServiceManagerConnectionImpl);
};
} // namespace content
#endif // CONTENT_COMMON_SERVICE_MANAGER_SERVICE_MANAGER_CONNECTION_IMPL_H_
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/common/service_manager/service_manager_connection_impl.h"
#include "base/callback_helpers.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/threading/thread.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/service_manager/public/cpp/constants.h"
#include "services/service_manager/public/cpp/identity.h"
#include "services/service_manager/public/cpp/service.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
namespace {
constexpr char kTestServiceName[] = "test service";
} // namespace
TEST(ServiceManagerConnectionImplTest, ServiceLaunchThreading) {
base::test::SingleThreadTaskEnvironment task_environment;
base::Thread io_thread("ServiceManagerConnectionImplTest IO Thread");
io_thread.Start();
mojo::Remote<service_manager::mojom::Service> service;
ServiceManagerConnectionImpl connection_impl(
service.BindNewPipeAndPassReceiver(), io_thread.task_runner());
ServiceManagerConnection& connection = connection_impl;
base::WaitableEvent event(base::WaitableEvent::ResetPolicy::MANUAL,
base::WaitableEvent::InitialState::NOT_SIGNALED);
connection.AddServiceRequestHandler(
kTestServiceName,
base::BindLambdaForTesting(
[&event](mojo::PendingReceiver<service_manager::mojom::Service>) {
event.Signal();
}));
connection.Start();
mojo::PendingRemote<service_manager::mojom::Service> packaged_service;
mojo::PendingRemote<service_manager::mojom::ProcessMetadata> metadata;
ignore_result(metadata.InitWithNewPipeAndPassReceiver());
service->CreatePackagedServiceInstance(
service_manager::Identity(kTestServiceName, base::Token::CreateRandom(),
base::Token(), base::Token::CreateRandom()),
packaged_service.InitWithNewPipeAndPassReceiver(), std::move(metadata));
event.Wait();
}
} // namespace content
......@@ -151,7 +151,6 @@ source_set("common_sources") {
"sandbox_init.h",
"sandboxed_process_launcher_delegate.cc",
"sandboxed_process_launcher_delegate.h",
"service_manager_connection.h",
"socket_permission_request.h",
"stop_find_action.h",
"storage_quota_params.h",
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_PUBLIC_COMMON_SERVICE_MANAGER_CONNECTION_H_
#define CONTENT_PUBLIC_COMMON_SERVICE_MANAGER_CONNECTION_H_
#include <memory>
#include "base/callback_forward.h"
#include "base/sequenced_task_runner.h"
#include "content/common/content_export.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "services/service_manager/public/cpp/identity.h"
#include "services/service_manager/public/cpp/service.h"
#include "services/service_manager/public/mojom/connector.mojom-forward.h"
#include "services/service_manager/public/mojom/service.mojom-forward.h"
namespace service_manager {
class Connector;
}
namespace content {
// Encapsulates a connection to a //services/service_manager.
// Access a global instance on the thread the ServiceContext was bound by
// calling Holder::Get().
// Clients can add service_manager::Service implementations whose exposed
// interfaces
// will be exposed to inbound connections to this object's Service.
// Alternatively clients can define named services that will be constructed when
// requests for those service names are received.
// Clients must call any of the registration methods when receiving
// ContentBrowserClient::RegisterInProcessServices().
class CONTENT_EXPORT ServiceManagerConnection {
public:
using ServiceRequestHandler = base::RepeatingCallback<void(
mojo::PendingReceiver<service_manager::mojom::Service>)>;
using ServiceRequestHandlerWithCallback = base::RepeatingCallback<void(
mojo::PendingReceiver<service_manager::mojom::Service>,
service_manager::Service::CreatePackagedServiceInstanceCallback)>;
using Factory =
base::RepeatingCallback<std::unique_ptr<ServiceManagerConnection>(void)>;
// Stores an instance of |connection| in TLS for the current process. Must be
// called on the thread the connection was created on.
static void SetForProcess(
std::unique_ptr<ServiceManagerConnection> connection);
// Returns the per-process instance, or nullptr if the Service Manager
// connection has not yet been bound. Must be called on the thread the
// connection was created on.
static ServiceManagerConnection* GetForProcess();
// Destroys the per-process instance. Must be called on the thread the
// connection was created on.
static void DestroyForProcess();
virtual ~ServiceManagerConnection();
// Sets the factory used to create the ServiceManagerConnection. This must be
// called before the ServiceManagerConnection has been created.
static void SetFactoryForTest(Factory* factory);
// Creates a ServiceManagerConnection from |request|. The connection binds
// its interfaces and accept new connections on |io_task_runner| only. Note
// that no incoming connections are accepted until Start() is called.
static std::unique_ptr<ServiceManagerConnection> Create(
mojo::PendingReceiver<service_manager::mojom::Service> receiver,
scoped_refptr<base::SequencedTaskRunner> io_task_runner);
// Begins accepting incoming connections.
virtual void Start() = 0;
// Stops accepting incoming connections. This happens asynchronously by
// posting to the IO thread, and cannot be undone.
virtual void Stop() = 0;
// Returns the service_manager::Connector received via this connection's
// Service
// implementation. Use this to initiate connections as this object's Identity.
virtual service_manager::Connector* GetConnector() = 0;
// Sets a closure that is called when the connection is lost. Note that
// connection may already have been closed, in which case |closure| will be
// run immediately before returning from this function.
virtual void SetConnectionLostClosure(base::OnceClosure closure) = 0;
// Adds a generic ServiceRequestHandler for a given service name. This
// will be used to satisfy any incoming calls to CreateService() which
// reference the given name.
virtual void AddServiceRequestHandler(
const std::string& name,
const ServiceRequestHandler& handler) = 0;
// Similar to above but for registering handlers which want to communicate
// additional information the process hosting the new service.
virtual void AddServiceRequestHandlerWithCallback(
const std::string& name,
const ServiceRequestHandlerWithCallback& handler) = 0;
// Sets a request handler to use if no registered handlers were interested in
// an incoming service request. Must be called before |Start()|.
using DefaultServiceRequestHandler = base::RepeatingCallback<void(
const std::string& service_name,
mojo::PendingReceiver<service_manager::mojom::Service>)>;
virtual void SetDefaultServiceRequestHandler(
const DefaultServiceRequestHandler& handler) = 0;
};
} // namespace content
#endif // CONTENT_PUBLIC_COMMON_SERVICE_MANAGER_CONNECTION_H_
......@@ -2066,7 +2066,6 @@ test("content_unittests") {
"../common/input/touch_event_stream_validator_unittest.cc",
"../common/inter_process_time_ticks_converter_unittest.cc",
"../common/net/ip_address_space_util_unittest.cc",
"../common/service_manager/service_manager_connection_impl_unittest.cc",
"../common/service_worker/service_worker_utils_unittest.cc",
"../common/state_transitions_unittest.cc",
"../common/user_agent_unittest.cc",
......
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