Commit 1be1ff8f 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: Idbca68c2a930810beedeefc2f2d1b894194c0f2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2468314Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Zentaro Kavanagh <zentaro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817766}
parent b03f8130
......@@ -111,7 +111,7 @@ class GWP_ASAN_EXPORT GuardedPageAllocator {
// SimpleFreeList is specifically designed to pre-allocate data in Initialize
// so that it never recurses into malloc/free during Allocate/Free.
template <typename T>
class SimpleFreeList : public FreeList<T> {
class SimpleFreeList final : public FreeList<T> {
public:
~SimpleFreeList() final = default;
void Initialize(T max_entries) final;
......@@ -139,7 +139,8 @@ class GWP_ASAN_EXPORT GuardedPageAllocator {
// first-come first-serve basis, this makes it likely that all slots will be
// used up by common types first. Set aside a fixed amount of slots (~5%) for
// one-off partitions so that we make sure to sample rare types as well.
class PartitionAllocSlotFreeList : public FreeList<AllocatorState::SlotIdx> {
class PartitionAllocSlotFreeList final
: public FreeList<AllocatorState::SlotIdx> {
public:
PartitionAllocSlotFreeList();
~PartitionAllocSlotFreeList() final;
......
......@@ -17,7 +17,7 @@
namespace openscreen_platform {
class TlsClientConnection : public openscreen::TlsConnection {
class TlsClientConnection final : public openscreen::TlsConnection {
public:
TlsClientConnection(
openscreen::TaskRunner* task_runner,
......
......@@ -31,7 +31,7 @@ struct TlsListenOptions;
namespace openscreen_platform {
class TlsConnectionFactory : public openscreen::TlsConnectionFactory {
class TlsConnectionFactory final : public openscreen::TlsConnectionFactory {
public:
TlsConnectionFactory(openscreen::TlsConnectionFactory::Client* client,
openscreen::TaskRunner* task_runner);
......
......@@ -23,8 +23,8 @@ class IPEndPoint;
namespace openscreen_platform {
class UdpSocket : public openscreen::UdpSocket,
network::mojom::UDPSocketListener {
class UdpSocket final : public openscreen::UdpSocket,
network::mojom::UDPSocketListener {
public:
UdpSocket(Client* client,
const openscreen::IPEndpoint& local_endpoint,
......
......@@ -462,7 +462,7 @@ class V8DetailedMemoryRequest {
SEQUENCE_CHECKER(sequence_checker_);
};
class V8DetailedMemoryRequestOneShot : public V8DetailedMemoryObserver {
class V8DetailedMemoryRequestOneShot final : public V8DetailedMemoryObserver {
public:
// A callback that will be passed the results of the measurement. |process|
// will always match the value passed to the V8DetailedMemoryRequestOneShot
......
......@@ -39,7 +39,7 @@ class V8ContextTrackerDataStore;
//
// Note that this component relies on the ExecutionContextRegistry having been
// added to the Graph.
class V8ContextTracker
class V8ContextTracker final
: public execution_context::ExecutionContextObserverDefaultImpl,
public GraphObserver,
public GraphOwned,
......
......@@ -71,7 +71,7 @@ class ContextProvider;
// planar image data is packed into GL_RGBA textures, how the output textures
// should be sized, and why there are alignment requirements when specifying the
// output rect.
class VIZ_COMMON_EXPORT GLI420Converter : public ContextLostObserver {
class VIZ_COMMON_EXPORT GLI420Converter final : public ContextLostObserver {
public:
// GLI420Converter uses the exact same parameters as GLScaler.
using Parameters = GLScaler::Parameters;
......
......@@ -40,7 +40,7 @@ class ContextProvider;
// can be configured to operate at different quality levels, manages/converts
// color spaces, and optionally re-arranges/formats data in output textures for
// use with more-efficient texture readback pipelines.
class VIZ_COMMON_EXPORT GLScaler : public ContextLostObserver {
class VIZ_COMMON_EXPORT GLScaler final : public ContextLostObserver {
public:
struct VIZ_COMMON_EXPORT Parameters {
// Relative scale from/to factors. Both of these must be non-zero.
......
......@@ -38,7 +38,8 @@ class VIZ_HOST_EXPORT ClientFrameSinkVideoCapturer
: private mojom::FrameSinkVideoConsumer {
public:
// A re-connectable FrameSinkVideoCaptureOverlay. See CreateOverlay().
class VIZ_HOST_EXPORT Overlay : public mojom::FrameSinkVideoCaptureOverlay {
class VIZ_HOST_EXPORT Overlay final
: public mojom::FrameSinkVideoCaptureOverlay {
public:
Overlay(base::WeakPtr<ClientFrameSinkVideoCapturer> client_capturer,
int32_t stacking_index);
......
......@@ -387,7 +387,7 @@ namespace {
// it has been destroyed in the meantime. We use the WeakPtr to the
// GLRendererCopier as an indicator that the GLContext is still alive. If the
// access to the GLContext is lost, we treat the copy output as failed.
class GLPixelBufferRGBAResult : public CopyOutputResult {
class GLPixelBufferRGBAResult final : public CopyOutputResult {
public:
GLPixelBufferRGBAResult(const gfx::Rect& result_rect,
const gfx::ColorSpace& color_space,
......@@ -636,7 +636,7 @@ namespace {
// pixel buffer object, and automatically deletes the pixel buffer object at
// destruction time. This provides an optimal one-copy data flow, from the pixel
// buffer into client-provided memory.
class GLPixelBufferI420Result : public CopyOutputResult {
class GLPixelBufferI420Result final : public CopyOutputResult {
public:
// |aligned_rect| identifies the region of result pixels in the pixel buffer,
// while the |result_rect| is the subregion that is exposed to the client.
......
......@@ -15,7 +15,7 @@ namespace viz {
// Represents an in-flight frame delivery to the consumer. Its main purpose is
// to proxy callbacks from the consumer back to the relevant capturer
// components owned and operated by FrameSinkVideoCapturerImpl.
class VIZ_SERVICE_EXPORT InFlightFrameDelivery
class VIZ_SERVICE_EXPORT InFlightFrameDelivery final
: public mojom::FrameSinkVideoConsumerFrameCallbacks {
public:
InFlightFrameDelivery(
......
......@@ -47,7 +47,7 @@ namespace viz {
//
// The blit algorithm uses naive linear blending. Thus, the use of non-linear
// color spaces will cause loses in color accuracy.
class VIZ_SERVICE_EXPORT VideoCaptureOverlay
class VIZ_SERVICE_EXPORT VideoCaptureOverlay final
: public mojom::FrameSinkVideoCaptureOverlay {
public:
// Interface for notifying the frame source when changes to the overlay's
......
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