Commit 8755beb8 authored by Ken Rockot's avatar Ken Rockot Committed by Commit Bot

[content] Remove Child mojom interface

This interface is no longer used.

Bug: 977637
Change-Id: I69f7fe7aac89c2da60fdb3cf8844712de90e9455
Tbr: nasko@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1707815
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678744}
parent a66547d2
......@@ -467,7 +467,6 @@ mojom("mojo_bindings") {
sources = [
"associated_interfaces.mojom",
"child.mojom",
"child_process.mojom",
"document_scoped_interface_bundle.mojom",
"download/mhtml_file_writer.mojom",
......
// 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.
module content.mojom;
// This interface encapsulates a pipe between a child and browser processes
// that each side uses to monitor the lifetime of the connection.
interface Child {};
......@@ -12,7 +12,6 @@
#include "base/process/process.h"
#include "base/rand_util.h"
#include "base/strings/string_number_conversions.h"
#include "content/common/child.mojom.h"
#include "content/public/common/service_manager_connection.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/system/message_pipe.h"
......@@ -88,7 +87,6 @@ class ChildConnection::IOThreadContext
mojo::PendingRemote<service_manager::mojom::Service>(
std::move(service_pipe), 0),
std::move(metadata_receiver));
connector_->BindInterface(child_identity, &child_);
}
}
......@@ -108,8 +106,6 @@ class ChildConnection::IOThreadContext
// Usable from the IO thread only.
std::unique_ptr<service_manager::Connector> connector_;
service_manager::Identity child_identity_;
// ServiceManagerConnection in the child monitors the lifetime of this pipe.
mojom::ChildPtr child_;
mojo::Remote<service_manager::mojom::ProcessMetadata> remote_metadata_;
// Hold onto the process, and thus its process handle, so that the pid will
// remain valid.
......
......@@ -19,7 +19,6 @@
#include "base/threading/thread_checker.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "content/common/child.mojom.h"
#include "content/public/common/connection_filter.h"
#include "content/public/common/service_names.mojom.h"
#include "mojo/public/cpp/system/message_pipe.h"
......@@ -49,16 +48,14 @@ ServiceManagerConnection::Factory* service_manager_connection_factory = nullptr;
// bindings.
class ServiceManagerConnectionImpl::IOThreadContext
: public base::RefCountedThreadSafe<IOThreadContext>,
public service_manager::Service,
public mojom::Child {
public service_manager::Service {
public:
IOThreadContext(service_manager::mojom::ServiceRequest service_request,
scoped_refptr<base::SequencedTaskRunner> io_task_runner,
service_manager::mojom::ConnectorRequest connector_request)
: pending_service_request_(std::move(service_request)),
io_task_runner_(io_task_runner),
pending_connector_request_(std::move(connector_request)),
child_binding_(this) {
pending_connector_request_(std::move(connector_request)) {
// This will be reattached by any of the IO thread functions on first call.
io_thread_checker_.DetachFromThread();
}
......@@ -215,7 +212,6 @@ class ServiceManagerConnectionImpl::IOThreadContext
ClearConnectionFiltersOnIOThread();
request_handlers_.clear();
child_binding_.Close();
}
void ClearConnectionFiltersOnIOThread() {
......@@ -248,21 +244,14 @@ class ServiceManagerConnectionImpl::IOThreadContext
const std::string& interface_name,
mojo::ScopedMessagePipeHandle interface_pipe) override {
DCHECK(io_thread_checker_.CalledOnValidThread());
if ((source_info.identity.name() == mojom::kBrowserServiceName ||
source_info.identity.name() == mojom::kSystemServiceName) &&
interface_name == mojom::Child::Name_) {
DCHECK(!child_binding_.is_bound());
child_binding_.Bind(mojom::ChildRequest(std::move(interface_pipe)));
} else {
base::AutoLock lock(lock_);
for (auto& entry : connection_filters_) {
entry.second->OnBindInterface(source_info, interface_name,
&interface_pipe,
service_binding_->GetConnector());
// A filter may have bound the interface, claiming the pipe.
if (!interface_pipe.is_valid())
return;
}
base::AutoLock lock(lock_);
for (auto& entry : connection_filters_) {
entry.second->OnBindInterface(source_info, interface_name,
&interface_pipe,
service_binding_->GetConnector());
// A filter may have bound the interface, claiming the pipe.
if (!interface_pipe.is_valid())
return;
}
}
......@@ -325,8 +314,6 @@ class ServiceManagerConnectionImpl::IOThreadContext
std::map<std::string, ServiceRequestHandlerWithCallback> request_handlers_;
mojo::Binding<mojom::Child> child_binding_;
base::WeakPtrFactory<IOThreadContext> weak_factory_{this};
DISALLOW_COPY_AND_ASSIGN(IOThreadContext);
......
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