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 { ...@@ -25,7 +25,8 @@ namespace media {
class MojoDecoderBufferWriter; class MojoDecoderBufferWriter;
// An AudioDecoder that proxies to a mojom::AudioDecoder. // An AudioDecoder that proxies to a mojom::AudioDecoder.
class MojoAudioDecoder : public AudioDecoder, public mojom::AudioDecoderClient { class MojoAudioDecoder final : public AudioDecoder,
public mojom::AudioDecoderClient {
public: public:
MojoAudioDecoder(scoped_refptr<base::SingleThreadTaskRunner> task_runner, MojoAudioDecoder(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
mojo::PendingRemote<mojom::AudioDecoder> remote_decoder); mojo::PendingRemote<mojom::AudioDecoder> remote_decoder);
......
...@@ -37,9 +37,9 @@ class MojoDecryptor; ...@@ -37,9 +37,9 @@ class MojoDecryptor;
// A ContentDecryptionModule that proxies to a mojom::ContentDecryptionModule. // A ContentDecryptionModule that proxies to a mojom::ContentDecryptionModule.
// That mojom::ContentDecryptionModule proxies back to the MojoCdm via the // That mojom::ContentDecryptionModule proxies back to the MojoCdm via the
// mojom::ContentDecryptionModuleClient interface. // mojom::ContentDecryptionModuleClient interface.
class MojoCdm : public ContentDecryptionModule, class MojoCdm final : public ContentDecryptionModule,
public CdmContext, public CdmContext,
public mojom::ContentDecryptionModuleClient { public mojom::ContentDecryptionModuleClient {
public: public:
using MessageType = CdmMessageType; using MessageType = CdmMessageType;
......
...@@ -14,7 +14,7 @@ namespace mojom { ...@@ -14,7 +14,7 @@ namespace mojom {
class InterfaceFactory; class InterfaceFactory;
} }
class MojoCdmFactory : public CdmFactory { class MojoCdmFactory final : public CdmFactory {
public: public:
explicit MojoCdmFactory(media::mojom::InterfaceFactory* interface_factory); explicit MojoCdmFactory(media::mojom::InterfaceFactory* interface_factory);
~MojoCdmFactory() final; ~MojoCdmFactory() final;
......
...@@ -15,7 +15,7 @@ namespace mojom { ...@@ -15,7 +15,7 @@ namespace mojom {
class InterfaceFactory; class InterfaceFactory;
} }
class MojoDecoderFactory : public DecoderFactory { class MojoDecoderFactory final : public DecoderFactory {
public: public:
explicit MojoDecoderFactory( explicit MojoDecoderFactory(
media::mojom::InterfaceFactory* interface_factory); media::mojom::InterfaceFactory* interface_factory);
......
...@@ -25,7 +25,7 @@ class MojoDecoderBufferWriter; ...@@ -25,7 +25,7 @@ class MojoDecoderBufferWriter;
// This class is single threaded. The |remote_decryptor| is connected before // This class is single threaded. The |remote_decryptor| is connected before
// being passed to MojoDecryptor, but it is bound to the thread MojoDecryptor // being passed to MojoDecryptor, but it is bound to the thread MojoDecryptor
// lives on the first time it is used in this class. // lives on the first time it is used in this class.
class MojoDecryptor : public Decryptor { class MojoDecryptor final : public Decryptor {
public: public:
// |writer_capacity| can be used for testing. If 0, default writer capacity // |writer_capacity| can be used for testing. If 0, default writer capacity
// will be used. // will be used.
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
namespace media { namespace media {
// Implementation of a mojom::MediaLog service which wraps a media::MediaLog. // Implementation of a mojom::MediaLog service which wraps a media::MediaLog.
class MojoMediaLogService : public mojom::MediaLog { class MojoMediaLogService final : public mojom::MediaLog {
public: public:
explicit MojoMediaLogService(media::MediaLog* media_log); explicit MojoMediaLogService(media::MediaLog* media_log);
~MojoMediaLogService() final; ~MojoMediaLogService() final;
......
...@@ -30,7 +30,7 @@ class MojoRenderer; ...@@ -30,7 +30,7 @@ class MojoRenderer;
// wrapper factories that use MRF, rather than creating derived MojoRenderer // wrapper factories that use MRF, rather than creating derived MojoRenderer
// types, or extending MRF. See DecryptingRendererFactory and // types, or extending MRF. See DecryptingRendererFactory and
// MediaPlayerRendererClientFactory for examples of small wrappers around MRF. // MediaPlayerRendererClientFactory for examples of small wrappers around MRF.
class MojoRendererFactory : public RendererFactory { class MojoRendererFactory final : public RendererFactory {
public: public:
explicit MojoRendererFactory( explicit MojoRendererFactory(
media::mojom::InterfaceFactory* interface_factory); 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