diff options
author | Viet-Trung Luu <viettrungluu@chromium.org> | 2014-10-21 09:52:39 -0700 |
---|---|---|
committer | Viet-Trung Luu <viettrungluu@chromium.org> | 2014-10-21 16:54:16 +0000 |
commit | 3a09fd48b0780995311f1cebc1b87c3648dc0552 (patch) | |
tree | abbec3e6090b72c8ef3298ef7a9d5555b515cb60 | |
parent | d94fd1d623893516b98e59e2b79e512ac26556f4 (diff) | |
download | chromium_src-3a09fd48b0780995311f1cebc1b87c3648dc0552.zip chromium_src-3a09fd48b0780995311f1cebc1b87c3648dc0552.tar.gz chromium_src-3a09fd48b0780995311f1cebc1b87c3648dc0552.tar.bz2 |
Mojo: Fixes to current virtual/override style in mojo/edk/.
This was mostly done in https://codereview.chromium.org/668663006/, but:
* it missed things deriving from testing::Test for some reason;
* it didn't touch Windows-only files (for more obvious reasons).
R=sky@chromium.org
BUG=417463
Review URL: https://codereview.chromium.org/670743002
Cr-Commit-Position: refs/heads/master@{#300502}
-rw-r--r-- | mojo/edk/embedder/embedder_unittest.cc | 2 | ||||
-rw-r--r-- | mojo/edk/embedder/platform_channel_pair_posix_unittest.cc | 6 | ||||
-rw-r--r-- | mojo/edk/system/channel_unittest.cc | 4 | ||||
-rw-r--r-- | mojo/edk/system/core_test_base.h | 6 | ||||
-rw-r--r-- | mojo/edk/system/message_pipe.h | 2 | ||||
-rw-r--r-- | mojo/edk/system/message_pipe_test_utils.h | 2 | ||||
-rw-r--r-- | mojo/edk/system/raw_channel_unittest.cc | 6 | ||||
-rw-r--r-- | mojo/edk/system/raw_channel_win.cc | 30 | ||||
-rw-r--r-- | mojo/edk/system/remote_message_pipe_unittest.cc | 6 | ||||
-rw-r--r-- | mojo/edk/system/shared_buffer_dispatcher_unittest.cc | 2 |
10 files changed, 33 insertions, 33 deletions
diff --git a/mojo/edk/embedder/embedder_unittest.cc b/mojo/edk/embedder/embedder_unittest.cc index 551ea272..5c4d0d8 100644 --- a/mojo/edk/embedder/embedder_unittest.cc +++ b/mojo/edk/embedder/embedder_unittest.cc @@ -102,7 +102,7 @@ class ScopedTestChannel { class EmbedderTest : public testing::Test { public: EmbedderTest() : test_io_thread_(base::TestIOThread::kAutoStart) {} - virtual ~EmbedderTest() {} + ~EmbedderTest() override {} protected: base::TestIOThread* test_io_thread() { return &test_io_thread_; } diff --git a/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc b/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc index 355e573..926bbc5 100644 --- a/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc +++ b/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc @@ -42,16 +42,16 @@ void WaitReadable(PlatformHandle h) { class PlatformChannelPairPosixTest : public testing::Test { public: PlatformChannelPairPosixTest() {} - virtual ~PlatformChannelPairPosixTest() {} + ~PlatformChannelPairPosixTest() override {} - virtual void SetUp() override { + void SetUp() override { // Make sure |SIGPIPE| isn't being ignored. struct sigaction action = {}; action.sa_handler = SIG_DFL; ASSERT_EQ(0, sigaction(SIGPIPE, &action, &old_action_)); } - virtual void TearDown() override { + void TearDown() override { // Restore the |SIGPIPE| handler. ASSERT_EQ(0, sigaction(SIGPIPE, &old_action_, nullptr)); } diff --git a/mojo/edk/system/channel_unittest.cc b/mojo/edk/system/channel_unittest.cc index c85bf92..7d45f6e 100644 --- a/mojo/edk/system/channel_unittest.cc +++ b/mojo/edk/system/channel_unittest.cc @@ -33,9 +33,9 @@ class ChannelTest : public testing::Test { ChannelTest() : io_thread_(base::TestIOThread::kAutoStart), init_result_(TRISTATE_UNKNOWN) {} - virtual ~ChannelTest() {} + ~ChannelTest() override {} - virtual void SetUp() override { + void SetUp() override { io_thread_.PostTaskAndWait( FROM_HERE, base::Bind(&ChannelTest::SetUpOnIOThread, base::Unretained(this))); diff --git a/mojo/edk/system/core_test_base.h b/mojo/edk/system/core_test_base.h index 409f7e1..2881176 100644 --- a/mojo/edk/system/core_test_base.h +++ b/mojo/edk/system/core_test_base.h @@ -25,10 +25,10 @@ class CoreTestBase : public testing::Test { typedef CoreTestBase_MockHandleInfo MockHandleInfo; CoreTestBase(); - virtual ~CoreTestBase(); + ~CoreTestBase() override; - virtual void SetUp() override; - virtual void TearDown() override; + void SetUp() override; + void TearDown() override; protected: // |info| must remain alive until the returned handle is closed. diff --git a/mojo/edk/system/message_pipe.h b/mojo/edk/system/message_pipe.h index e1d9f63..a52743d 100644 --- a/mojo/edk/system/message_pipe.h +++ b/mojo/edk/system/message_pipe.h @@ -99,7 +99,7 @@ class MOJO_SYSTEM_IMPL_EXPORT MessagePipe MessagePipe(); friend class base::RefCountedThreadSafe<MessagePipe>; - virtual ~MessagePipe(); + ~MessagePipe(); // This is used internally by |WriteMessage()| and by |EnqueueMessage()|. // |transports| may be non-null only if it's nonempty and |message| has no diff --git a/mojo/edk/system/message_pipe_test_utils.h b/mojo/edk/system/message_pipe_test_utils.h index 9e6a4b7..c9d9c8b 100644 --- a/mojo/edk/system/message_pipe_test_utils.h +++ b/mojo/edk/system/message_pipe_test_utils.h @@ -49,7 +49,7 @@ class ChannelThread { class MultiprocessMessagePipeTestBase : public testing::Test { public: MultiprocessMessagePipeTestBase(); - virtual ~MultiprocessMessagePipeTestBase(); + ~MultiprocessMessagePipeTestBase() override; protected: void Init(scoped_refptr<ChannelEndpoint> ep); diff --git a/mojo/edk/system/raw_channel_unittest.cc b/mojo/edk/system/raw_channel_unittest.cc index 23c2e7f..9ee937d 100644 --- a/mojo/edk/system/raw_channel_unittest.cc +++ b/mojo/edk/system/raw_channel_unittest.cc @@ -73,16 +73,16 @@ bool WriteTestMessageToHandle(const embedder::PlatformHandle& handle, class RawChannelTest : public testing::Test { public: RawChannelTest() : io_thread_(base::TestIOThread::kManualStart) {} - virtual ~RawChannelTest() {} + ~RawChannelTest() override {} - virtual void SetUp() override { + void SetUp() override { embedder::PlatformChannelPair channel_pair; handles[0] = channel_pair.PassServerHandle(); handles[1] = channel_pair.PassClientHandle(); io_thread_.Start(); } - virtual void TearDown() override { + void TearDown() override { io_thread_.Stop(); handles[0].reset(); handles[1].reset(); diff --git a/mojo/edk/system/raw_channel_win.cc b/mojo/edk/system/raw_channel_win.cc index 208d595..98380a9 100644 --- a/mojo/edk/system/raw_channel_win.cc +++ b/mojo/edk/system/raw_channel_win.cc @@ -72,10 +72,10 @@ base::LazyInstance<VistaOrHigherFunctions> g_vista_or_higher_functions = class RawChannelWin : public RawChannel { public: RawChannelWin(embedder::ScopedPlatformHandle handle); - virtual ~RawChannelWin(); + ~RawChannelWin() override; // |RawChannel| public methods: - virtual size_t GetSerializedPlatformHandleSize() const override; + size_t GetSerializedPlatformHandleSize() const override; private: // RawChannelIOHandler receives OS notifications for I/O completion. It must @@ -109,9 +109,9 @@ class RawChannelWin : public RawChannel { // |base::MessageLoopForIO::IOHandler| implementation: // Must be called on the I/O thread. It could be called before or after // detached from the owner. - virtual void OnIOCompleted(base::MessageLoopForIO::IOContext* context, - DWORD bytes_transferred, - DWORD error) override; + void OnIOCompleted(base::MessageLoopForIO::IOContext* context, + DWORD bytes_transferred, + DWORD error) override; // Must be called on the I/O thread under |owner_->write_lock()|. // After this call, the owner must not make any further calls on this @@ -121,7 +121,7 @@ class RawChannelWin : public RawChannel { scoped_ptr<WriteBuffer> write_buffer); private: - virtual ~RawChannelIOHandler(); + ~RawChannelIOHandler() override; // Returns true if |owner_| has been reset and there is not pending read or // write. @@ -160,17 +160,17 @@ class RawChannelWin : public RawChannel { }; // |RawChannel| private methods: - virtual IOResult Read(size_t* bytes_read) override; - virtual IOResult ScheduleRead() override; - virtual embedder::ScopedPlatformHandleVectorPtr GetReadPlatformHandles( + IOResult Read(size_t* bytes_read) override; + IOResult ScheduleRead() override; + embedder::ScopedPlatformHandleVectorPtr GetReadPlatformHandles( size_t num_platform_handles, const void* platform_handle_table) override; - virtual IOResult WriteNoLock(size_t* platform_handles_written, - size_t* bytes_written) override; - virtual IOResult ScheduleWriteNoLock() override; - virtual bool OnInit() override; - virtual void OnShutdownNoLock(scoped_ptr<ReadBuffer> read_buffer, - scoped_ptr<WriteBuffer> write_buffer) override; + IOResult WriteNoLock(size_t* platform_handles_written, + size_t* bytes_written) override; + IOResult ScheduleWriteNoLock() override; + bool OnInit() override; + void OnShutdownNoLock(scoped_ptr<ReadBuffer> read_buffer, + scoped_ptr<WriteBuffer> write_buffer) override; // Passed to |io_handler_| during initialization. embedder::ScopedPlatformHandle handle_; diff --git a/mojo/edk/system/remote_message_pipe_unittest.cc b/mojo/edk/system/remote_message_pipe_unittest.cc index f7095d2..6e0b991 100644 --- a/mojo/edk/system/remote_message_pipe_unittest.cc +++ b/mojo/edk/system/remote_message_pipe_unittest.cc @@ -44,16 +44,16 @@ namespace { class RemoteMessagePipeTest : public testing::Test { public: RemoteMessagePipeTest() : io_thread_(base::TestIOThread::kAutoStart) {} - virtual ~RemoteMessagePipeTest() {} + ~RemoteMessagePipeTest() override {} - virtual void SetUp() override { + void SetUp() override { io_thread_.PostTaskAndWait( FROM_HERE, base::Bind(&RemoteMessagePipeTest::SetUpOnIOThread, base::Unretained(this))); } - virtual void TearDown() override { + void TearDown() override { io_thread_.PostTaskAndWait( FROM_HERE, base::Bind(&RemoteMessagePipeTest::TearDownOnIOThread, diff --git a/mojo/edk/system/shared_buffer_dispatcher_unittest.cc b/mojo/edk/system/shared_buffer_dispatcher_unittest.cc index d46ffe3..a80f71d 100644 --- a/mojo/edk/system/shared_buffer_dispatcher_unittest.cc +++ b/mojo/edk/system/shared_buffer_dispatcher_unittest.cc @@ -43,7 +43,7 @@ void RevalidateCreateOptions( class SharedBufferDispatcherTest : public testing::Test { public: SharedBufferDispatcherTest() {} - virtual ~SharedBufferDispatcherTest() {} + ~SharedBufferDispatcherTest() override {} embedder::PlatformSupport* platform_support() { return &platform_support_; } |