Skip to content

Commit 7db6396

Browse files
tsepezjmajnert
authored andcommitted
Remove class IPC::Sender
Nothing remains besides a destructor. -- Mark one class final when devirtualizing a destructor. Change-Id: Ie62e751df24d60625a4493c8ad870446a7aa1d31 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7056007 Reviewed-by: Daniel Cheng <[email protected]> Commit-Queue: Daniel Cheng <[email protected]> Auto-Submit: Tom Sepez <[email protected]> Cr-Commit-Position: refs/heads/main@{#1532397}
1 parent 256ea3d commit 7db6396

File tree

6 files changed

+6
-33
lines changed

6 files changed

+6
-33
lines changed

ipc/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ component("ipc") {
3939
"ipc_message_pipe_reader.h",
4040
"ipc_mojo_bootstrap.cc",
4141
"ipc_mojo_bootstrap.h",
42-
"ipc_sender.h",
4342
"ipc_sync_channel.cc",
4443
"ipc_sync_channel.h",
4544
"urgent_message_observer.h",

ipc/ipc_channel.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "ipc/ipc.mojom-forward.h"
2525
#include "ipc/ipc.mojom.h"
2626
#include "ipc/ipc_message_pipe_reader.h"
27-
#include "ipc/ipc_sender.h"
2827
#include "mojo/public/cpp/bindings/generic_pending_associated_receiver.h"
2928
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
3029
#include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
@@ -48,9 +47,8 @@ class UrgentMessageObserver;
4847

4948
// Channels are implemented using mojo message pipes.
5049

51-
class COMPONENT_EXPORT(IPC) Channel
52-
: public Sender,
53-
public internal::MessagePipeReader::Delegate {
50+
class COMPONENT_EXPORT(IPC) Channel final
51+
: public internal::MessagePipeReader::Delegate {
5452
// Security tests need access to the pipe handle.
5553
friend class ChannelTest;
5654

@@ -126,7 +124,7 @@ class COMPONENT_EXPORT(IPC) Channel
126124
const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner,
127125
const scoped_refptr<base::SingleThreadTaskRunner>& proxy_task_runner);
128126

129-
~Channel() override;
127+
~Channel();
130128

131129
// Connect the pipe. On the server side, this will initiate
132130
// waiting for connections. On the client, it attempts to

ipc/ipc_channel_proxy.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "ipc/ipc.mojom.h"
2424
#include "ipc/ipc_channel.h"
2525
#include "ipc/ipc_listener.h"
26-
#include "ipc/ipc_sender.h"
2726
#include "mojo/public/cpp/bindings/associated_remote.h"
2827
#include "mojo/public/cpp/bindings/generic_pending_associated_receiver.h"
2928
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
@@ -69,7 +68,7 @@ class UrgentMessageObserver;
6968
// |channel_lifetime_lock_| is used to protect it. The locking overhead is only
7069
// paid if the underlying channel supports thread-safe |Send|.
7170
//
72-
class COMPONENT_EXPORT(IPC) ChannelProxy : public Sender {
71+
class COMPONENT_EXPORT(IPC) ChannelProxy {
7372
public:
7473
// Initializes a channel proxy. The channel_handle and mode parameters are
7574
// passed directly to the underlying IPC::Channel. The listener is called on
@@ -98,7 +97,7 @@ class COMPONENT_EXPORT(IPC) ChannelProxy : public Sender {
9897
const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner,
9998
const scoped_refptr<base::SingleThreadTaskRunner>& listener_task_runner);
10099

101-
~ChannelProxy() override;
100+
virtual ~ChannelProxy();
102101

103102
// Initializes the channel proxy. Only call this once to initialize a channel
104103
// proxy that was not initialized in its constructor. If |create_pipe_now| is

ipc/ipc_perftest_util.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "ipc/ipc_channel_proxy.h"
2525
#include "ipc/ipc_listener.h"
2626
#include "ipc/ipc_message.h"
27-
#include "ipc/ipc_sender.h"
2827
#include "ipc/ipc_test.test-mojom.h"
2928
#include "mojo/public/cpp/bindings/receiver.h"
3029
#include "mojo/public/cpp/system/message_pipe.h"

ipc/ipc_sender.h

Lines changed: 0 additions & 19 deletions
This file was deleted.

ipc/ipc_sync_channel_unittest.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include "build/build_config.h"
2929
#include "ipc/ipc_listener.h"
3030
#include "ipc/ipc_message.h"
31-
#include "ipc/ipc_sender.h"
3231
#include "mojo/public/cpp/system/message_pipe.h"
3332
#include "testing/gtest/include/gtest/gtest.h"
3433

@@ -38,7 +37,7 @@ namespace IPC {
3837
namespace {
3938

4039
// Base class for a "process" with listener and IPC threads.
41-
class Worker : public Listener, public Sender {
40+
class Worker : public Listener {
4241
public:
4342
// Will create a channel without a name.
4443
Worker(Channel::Mode mode,
@@ -208,8 +207,6 @@ class Worker : public Listener, public Sender {
208207
bool is_shutdown_;
209208
};
210209

211-
212-
213210
class IPCSyncChannelTest : public testing::Test {
214211
private:
215212
base::test::SingleThreadTaskEnvironment task_environment_;

0 commit comments

Comments
 (0)