Commit 310f936f 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: Ie813762ce32bbebf26bf1f661ffacba67636ef92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2508200
Auto-Submit: Zentaro Kavanagh <zentaro@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Reviewed-by: default avatarJohn Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823455}
parent 1220f797
...@@ -37,11 +37,11 @@ class AudioFramesImpl; ...@@ -37,11 +37,11 @@ class AudioFramesImpl;
class CdmAuxiliaryHelper; class CdmAuxiliaryHelper;
class CdmWrapper; class CdmWrapper;
class MEDIA_EXPORT CdmAdapter : public ContentDecryptionModule, class MEDIA_EXPORT CdmAdapter final : public ContentDecryptionModule,
public CdmContext, public CdmContext,
public Decryptor, public Decryptor,
public cdm::Host_10, public cdm::Host_10,
public cdm::Host_11 { public cdm::Host_11 {
public: public:
using CreateCdmFunc = void* (*)(int cdm_interface_version, using CreateCdmFunc = void* (*)(int cdm_interface_version,
const char* key_system, const char* key_system,
......
...@@ -17,7 +17,7 @@ namespace media { ...@@ -17,7 +17,7 @@ namespace media {
class ContentDecryptionModule; class ContentDecryptionModule;
class MEDIA_EXPORT CdmContextRefImpl : public CdmContextRef { class MEDIA_EXPORT CdmContextRefImpl final : public CdmContextRef {
public: public:
explicit CdmContextRefImpl(scoped_refptr<ContentDecryptionModule> cdm); explicit CdmContextRefImpl(scoped_refptr<ContentDecryptionModule> cdm);
~CdmContextRefImpl() final; ~CdmContextRefImpl() final;
......
...@@ -19,7 +19,7 @@ namespace media { ...@@ -19,7 +19,7 @@ namespace media {
class VideoFrame; class VideoFrame;
class DecryptedBlockImpl : public cdm::DecryptedBlock { class DecryptedBlockImpl final : public cdm::DecryptedBlock {
public: public:
DecryptedBlockImpl(); DecryptedBlockImpl();
~DecryptedBlockImpl() final; ~DecryptedBlockImpl() final;
...@@ -102,7 +102,7 @@ class MEDIA_EXPORT VideoFrameImpl : public cdm::VideoFrame, ...@@ -102,7 +102,7 @@ class MEDIA_EXPORT VideoFrameImpl : public cdm::VideoFrame,
DISALLOW_COPY_AND_ASSIGN(VideoFrameImpl); DISALLOW_COPY_AND_ASSIGN(VideoFrameImpl);
}; };
class AudioFramesImpl : public cdm::AudioFrames { class AudioFramesImpl final : public cdm::AudioFrames {
public: public:
AudioFramesImpl(); AudioFramesImpl();
~AudioFramesImpl() final; ~AudioFramesImpl() final;
......
...@@ -13,7 +13,7 @@ namespace media { ...@@ -13,7 +13,7 @@ namespace media {
struct CdmConfig; struct CdmConfig;
class MEDIA_EXPORT DefaultCdmFactory : public CdmFactory { class MEDIA_EXPORT DefaultCdmFactory final : public CdmFactory {
public: public:
DefaultCdmFactory(); DefaultCdmFactory();
~DefaultCdmFactory() final; ~DefaultCdmFactory() final;
......
...@@ -161,7 +161,7 @@ void SetupGlobalEnvironmentIfNeeded() { ...@@ -161,7 +161,7 @@ void SetupGlobalEnvironmentIfNeeded() {
// |kNestableTasksAllowed| because we could be running the RunLoop in a task, // |kNestableTasksAllowed| because we could be running the RunLoop in a task,
// e.g. in component builds when we share the same task runner as the host. In // e.g. in component builds when we share the same task runner as the host. In
// a static build, this is not necessary. // a static build, this is not necessary.
class VideoDecoderAdapter : public CdmVideoDecoder { class VideoDecoderAdapter final : public CdmVideoDecoder {
public: public:
VideoDecoderAdapter(CdmHostProxy* cdm_host_proxy, VideoDecoderAdapter(CdmHostProxy* cdm_host_proxy,
std::unique_ptr<VideoDecoder> video_decoder) std::unique_ptr<VideoDecoder> video_decoder)
......
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