diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 21:53:08 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 21:53:08 +0000 |
commit | 877d55dcd3e01d1db858f154a1f369e76b2ebaf2 (patch) | |
tree | ee2364ca767826deed3d541603d6c92ca2f0062e /media | |
parent | aaa47ee9d83f773d37aa4fd4a04097425ce62063 (diff) | |
download | chromium_src-877d55dcd3e01d1db858f154a1f369e76b2ebaf2.zip chromium_src-877d55dcd3e01d1db858f154a1f369e76b2ebaf2.tar.gz chromium_src-877d55dcd3e01d1db858f154a1f369e76b2ebaf2.tar.bz2 |
First patch in making destructors of refcounted objects private.
BUG=26749
Review URL: http://codereview.chromium.org/360042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/audio/linux/alsa_output.h | 4 | ||||
-rw-r--r-- | media/base/buffers.h | 6 | ||||
-rw-r--r-- | media/base/factory.h | 10 | ||||
-rw-r--r-- | media/filters/ffmpeg_demuxer.h | 4 |
4 files changed, 21 insertions, 3 deletions
diff --git a/media/audio/linux/alsa_output.h b/media/audio/linux/alsa_output.h index 58d9ea0..8aa0af3 100644 --- a/media/audio/linux/alsa_output.h +++ b/media/audio/linux/alsa_output.h @@ -75,7 +75,6 @@ class AlsaPcmOutputStream : AlsaWrapper* wrapper, AudioManagerLinux* manager, MessageLoop* message_loop); - virtual ~AlsaPcmOutputStream(); // Implementation of AudioOutputStream. virtual bool Open(size_t packet_size); @@ -86,6 +85,7 @@ class AlsaPcmOutputStream : virtual void GetVolume(double* volume); private: + friend class base::RefCountedThreadSafe<AlsaPcmOutputStream>; friend class AlsaPcmOutputStreamTest; FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_DeviceSelect); FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_FallbackDevices); @@ -106,6 +106,8 @@ class AlsaPcmOutputStream : FRIEND_TEST(AlsaPcmOutputStreamTest, WritePacket_StopStream); FRIEND_TEST(AlsaPcmOutputStreamTest, WritePacket_WriteFails); + virtual ~AlsaPcmOutputStream(); + // In-memory buffer to hold sound samples before pushing to the sound device. // TODO(ajwong): There are now about 3 buffer/packet implementations. Factor // them out. diff --git a/media/base/buffers.h b/media/base/buffers.h index 27ad130..6102ea9 100644 --- a/media/base/buffers.h +++ b/media/base/buffers.h @@ -100,6 +100,9 @@ class Buffer : public StreamSample { // If there's no data in this buffer, it represents end of stream. virtual bool IsEndOfStream() const { return GetData() == NULL; } + + protected: + virtual ~Buffer() {} }; @@ -114,6 +117,9 @@ class WritableBuffer : public Buffer { // Returns the size of the underlying buffer. virtual size_t GetBufferSize() const = 0; + + protected: + virtual ~WritableBuffer() {} }; diff --git a/media/base/factory.h b/media/base/factory.h index 3ccfcb1..ade8990 100644 --- a/media/base/factory.h +++ b/media/base/factory.h @@ -93,6 +93,8 @@ class FilterFactoryCollection : public FilterFactory { } private: + ~FilterFactoryCollection() {} + typedef std::vector< scoped_refptr<FilterFactory> > FactoryVector; FactoryVector factories_; @@ -123,6 +125,8 @@ class FilterFactoryImpl0 : public FilterFactory { } private: + ~FilterFactoryImpl0() {} + DISALLOW_COPY_AND_ASSIGN(FilterFactoryImpl0); }; @@ -152,6 +156,8 @@ class FilterFactoryImpl1 : public FilterFactory { } private: + ~FilterFactoryImpl1() {} + A const a_; DISALLOW_COPY_AND_ASSIGN(FilterFactoryImpl1); }; @@ -173,6 +179,8 @@ class FilterFactoryImpl2 : public FilterFactory { } private: + ~FilterFactoryImpl2() {} + A const a_; B const b_; @@ -214,6 +222,8 @@ class InstanceFilterFactory : public FilterFactory { } private: + ~InstanceFilterFactory() {} + scoped_refptr<Filter> filter_; bool create_called_; diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h index 7ab9449..f6af38c 100644 --- a/media/filters/ffmpeg_demuxer.h +++ b/media/filters/ffmpeg_demuxer.h @@ -54,8 +54,6 @@ class FFmpegDemuxerStream : public DemuxerStream, public AVStreamProvider { // inside |stream|. FFmpegDemuxerStream(FFmpegDemuxer* demuxer, AVStream* stream); - virtual ~FFmpegDemuxerStream(); - // Returns true is this stream has pending reads, false otherwise. // // Safe to call on any thread. @@ -85,6 +83,8 @@ class FFmpegDemuxerStream : public DemuxerStream, public AVStreamProvider { virtual void* QueryInterface(const char* interface_id); private: + virtual ~FFmpegDemuxerStream(); + // Carries out enqueuing a pending read on the demuxer thread. void ReadTask(Callback1<Buffer*>::Type* read_callback); |