Commit 37915944 authored by Zentaro Kavanagh's avatar Zentaro Kavanagh Committed by Commit Bot

Mark classes with final dtors as final

- -Wfinal-dtor-non-final-class warns on classes with final dtors but
  not final classes.
- Error messages are better when the class is marked final.
- Fix existing issues in code base and a follow up will remove warning
  exemption.

Bug: 999886
Test: no errors building
Change-Id: Ic31911e488e5b2d83ec960b2090dc44b8def25db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2468960
Commit-Queue: Zentaro Kavanagh <zentaro@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Auto-Submit: Zentaro Kavanagh <zentaro@chromium.org>
Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816819}
parent 30162aea
......@@ -25,7 +25,8 @@ namespace media {
class MojoDecoderBufferWriter;
// An AudioDecoder that proxies to a mojom::AudioDecoder.
class MojoAudioDecoder : public AudioDecoder, public mojom::AudioDecoderClient {
class MojoAudioDecoder final : public AudioDecoder,
public mojom::AudioDecoderClient {
public:
MojoAudioDecoder(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
mojo::PendingRemote<mojom::AudioDecoder> remote_decoder);
......
......@@ -37,9 +37,9 @@ class MojoDecryptor;
// A ContentDecryptionModule that proxies to a mojom::ContentDecryptionModule.
// That mojom::ContentDecryptionModule proxies back to the MojoCdm via the
// mojom::ContentDecryptionModuleClient interface.
class MojoCdm : public ContentDecryptionModule,
public CdmContext,
public mojom::ContentDecryptionModuleClient {
class MojoCdm final : public ContentDecryptionModule,
public CdmContext,
public mojom::ContentDecryptionModuleClient {
public:
using MessageType = CdmMessageType;
......
......@@ -14,7 +14,7 @@ namespace mojom {
class InterfaceFactory;
}
class MojoCdmFactory : public CdmFactory {
class MojoCdmFactory final : public CdmFactory {
public:
explicit MojoCdmFactory(media::mojom::InterfaceFactory* interface_factory);
~MojoCdmFactory() final;
......
......@@ -15,7 +15,7 @@ namespace mojom {
class InterfaceFactory;
}
class MojoDecoderFactory : public DecoderFactory {
class MojoDecoderFactory final : public DecoderFactory {
public:
explicit MojoDecoderFactory(
media::mojom::InterfaceFactory* interface_factory);
......
......@@ -25,7 +25,7 @@ class MojoDecoderBufferWriter;
// This class is single threaded. The |remote_decryptor| is connected before
// being passed to MojoDecryptor, but it is bound to the thread MojoDecryptor
// lives on the first time it is used in this class.
class MojoDecryptor : public Decryptor {
class MojoDecryptor final : public Decryptor {
public:
// |writer_capacity| can be used for testing. If 0, default writer capacity
// will be used.
......
......@@ -14,7 +14,7 @@
namespace media {
// Implementation of a mojom::MediaLog service which wraps a media::MediaLog.
class MojoMediaLogService : public mojom::MediaLog {
class MojoMediaLogService final : public mojom::MediaLog {
public:
explicit MojoMediaLogService(media::MediaLog* media_log);
~MojoMediaLogService() final;
......
......@@ -30,7 +30,7 @@ class MojoRenderer;
// wrapper factories that use MRF, rather than creating derived MojoRenderer
// types, or extending MRF. See DecryptingRendererFactory and
// MediaPlayerRendererClientFactory for examples of small wrappers around MRF.
class MojoRendererFactory : public RendererFactory {
class MojoRendererFactory final : public RendererFactory {
public:
explicit MojoRendererFactory(
media::mojom::InterfaceFactory* interface_factory);
......
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