Commit 19d10593 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: I93605e43f3a2f454e3a43e4cb370ac4d52f5330a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2508855
Auto-Submit: Zentaro Kavanagh <zentaro@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Zentaro Kavanagh <zentaro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823779}
parent bd4ea624
......@@ -14,7 +14,7 @@
namespace media {
class FakeSingleThreadTaskRunner : public base::SingleThreadTaskRunner {
class FakeSingleThreadTaskRunner final : public base::SingleThreadTaskRunner {
public:
explicit FakeSingleThreadTaskRunner(base::SimpleTestTickClock* clock);
......
......@@ -51,8 +51,8 @@ gfx::Size GetRotatedVideoSize(VideoRotation rotation, gfx::Size natural_size) {
// |default_renderer| in Start() and Resume() helps avoid a round trip to the
// render main task runner for Renderer creation in most cases which could add
// latency to start-to-play time.
class PipelineImpl::RendererWrapper : public DemuxerHost,
public RendererClient {
class PipelineImpl::RendererWrapper final : public DemuxerHost,
public RendererClient {
public:
RendererWrapper(scoped_refptr<base::SingleThreadTaskRunner> media_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
......
......@@ -18,7 +18,7 @@ namespace media {
// operations and modes of the camera. For the detailed state transitions for
// auto-exposure, auto-focus, and auto-white-balancing, see
// https://source.android.com/devices/camera/camera3_3Amodes
class CAPTURE_EXPORT Camera3AController
class CAPTURE_EXPORT Camera3AController final
: public CaptureMetadataDispatcher::ResultMetadataObserver {
public:
Camera3AController(const cros::mojom::CameraMetadataPtr& static_metadata,
......
......@@ -14,7 +14,7 @@ namespace media {
// Basic data source that treats the URL as a file path, and uses the file
// system to read data for a media pipeline.
class MEDIA_EXPORT MemoryDataSource : public DataSource {
class MEDIA_EXPORT MemoryDataSource final : public DataSource {
public:
// Construct MemoryDataSource with |data| and |size|. The data is guaranteed
// to be valid during the lifetime of MemoryDataSource.
......
......@@ -39,7 +39,7 @@ class RendererController;
// A media::Renderer implementation that proxies all operations to a remote
// renderer via RPCs. The CourierRenderer is instantiated by
// AdaptiveRendererFactory when media remoting is meant to take place.
class CourierRenderer : public Renderer {
class CourierRenderer final : public Renderer {
public:
// The whole class except for constructor and GetMediaTime() runs on
// |media_task_runner|. The constructor and GetMediaTime() run on render main
......
......@@ -21,7 +21,7 @@ class MediaLog;
//
// The caller must guarantee that the returned DecryptingRenderer will never
// be initialized with a |media_resource| of type MediaResource::Type::URL.
class MEDIA_EXPORT DecryptingRendererFactory : public RendererFactory {
class MEDIA_EXPORT DecryptingRendererFactory final : public RendererFactory {
public:
DecryptingRendererFactory(
MediaLog* media_log,
......
......@@ -13,7 +13,7 @@
namespace media {
class MEDIA_EXPORT DefaultDecoderFactory : public DecoderFactory {
class MEDIA_EXPORT DefaultDecoderFactory final : public DecoderFactory {
public:
// |external_decoder_factory| is optional decoder factory that provides
// additional decoders.
......
......@@ -35,7 +35,7 @@ using CreateVideoDecodersCB =
base::RepeatingCallback<std::vector<std::unique_ptr<VideoDecoder>>()>;
// The default factory class for creating RendererImpl.
class MEDIA_EXPORT DefaultRendererFactory : public RendererFactory {
class MEDIA_EXPORT DefaultRendererFactory final : public RendererFactory {
public:
using GetGpuFactoriesCB =
base::RepeatingCallback<GpuVideoAcceleratorFactories*()>;
......
......@@ -41,7 +41,7 @@ class TimeSource;
class VideoRenderer;
class WallClockTimeSource;
class MEDIA_EXPORT RendererImpl : public Renderer {
class MEDIA_EXPORT RendererImpl final : public Renderer {
public:
// Renders audio/video streams using |audio_renderer| and |video_renderer|
// provided. All methods except for GetMediaTime() run on the |task_runner|.
......
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