Skip to content

Commit

Permalink
More miscellaneous fixes for {virtual,override,final} style.
Browse files Browse the repository at this point in the history
Some more failures found by the trybots.
- content changes are to fix Linux ASAN build.
- media changes are to fix build with proprietary_codecs=1

BUG=417463
R=thakis@chromium.org
TBR=nasko@chromium.org, xhwang@chromium.org

Review URL: https://codereview.chromium.org/835503002

Cr-Commit-Position: refs/heads/master@{#309796}
  • Loading branch information
zetafunction committed Dec 31, 2014
1 parent 114042f commit 350a449
Show file tree
Hide file tree
Showing 21 changed files with 48 additions and 61 deletions.
3 changes: 1 addition & 2 deletions content/child/child_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@ class WaitAndExitDelegate : public base::PlatformThread::Delegate {
public:
explicit WaitAndExitDelegate(base::TimeDelta duration)
: duration_(duration) {}
virtual ~WaitAndExitDelegate() override {}

virtual void ThreadMain() override {
void ThreadMain() override {
base::PlatformThread::Sleep(duration_);
_exit(0);
}
Expand Down
2 changes: 0 additions & 2 deletions media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ class FFmpegAACBitstreamConverterTest : public testing::Test {
test_context_.extradata_size = sizeof(context_header_);
}

virtual ~FFmpegAACBitstreamConverterTest() {}

void CreatePacket(AVPacket* packet, const uint8* data, uint32 data_size) {
// Create new packet sized of |data_size| from |data|.
EXPECT_EQ(av_new_packet(packet, data_size), 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,6 @@ class FFmpegH264ToAnnexBBitstreamConverterTest : public testing::Test {
test_context_.extradata_size = sizeof(kHeaderDataOkWithFieldLen4);
}

virtual ~FFmpegH264ToAnnexBBitstreamConverterTest() {}

void CreatePacket(AVPacket* packet, const uint8* data, uint32 data_size) {
// Create new packet sized of |data_size| from |data|.
EXPECT_EQ(av_new_packet(packet, data_size), 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class H264ToAnnexBBitstreamConverterTest : public testing::Test {
protected:
H264ToAnnexBBitstreamConverterTest() {}

virtual ~H264ToAnnexBBitstreamConverterTest() {}
~H264ToAnnexBBitstreamConverterTest() override {}

protected:
mp4::AVCDecoderConfigurationRecord avc_config_;
Expand Down
1 change: 0 additions & 1 deletion media/formats/mp2t/es_adapter_video_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ GenerateFakeBuffers(const int* frame_pts_ms,
class EsAdapterVideoTest : public testing::Test {
public:
EsAdapterVideoTest();
virtual ~EsAdapterVideoTest() {}

protected:
// Feed the ES adapter with the buffers from |buffer_queue|.
Expand Down
8 changes: 4 additions & 4 deletions media/formats/mp2t/es_parser_adts.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ class MEDIA_EXPORT EsParserAdts : public EsParser {
EsParserAdts(const NewAudioConfigCB& new_audio_config_cb,
const EmitBufferCB& emit_buffer_cb,
bool sbr_in_mimetype);
virtual ~EsParserAdts();
~EsParserAdts() override;

// EsParser implementation.
virtual void Flush() override;
void Flush() override;

private:
struct AdtsFrame;

// EsParser implementation.
virtual bool ParseFromEsQueue() override;
virtual void ResetInternal() override;
bool ParseFromEsQueue() override;
void ResetInternal() override;

// Synchronize the stream on an ADTS syncword (consuming bytes from
// |es_queue_| if needed).
Expand Down
1 change: 0 additions & 1 deletion media/formats/mp2t/es_parser_adts_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class EsParserAdtsTest : public EsParserTestBase,
public testing::Test {
public:
EsParserAdtsTest();
virtual ~EsParserAdtsTest() {}

protected:
bool Process(const std::vector<Packet>& pes_packets, bool force_timing);
Expand Down
8 changes: 4 additions & 4 deletions media/formats/mp2t/es_parser_h264.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ class MEDIA_EXPORT EsParserH264 : public EsParser {

EsParserH264(const NewVideoConfigCB& new_video_config_cb,
const EmitBufferCB& emit_buffer_cb);
virtual ~EsParserH264();
~EsParserH264() override;

// EsParser implementation.
virtual void Flush() override;
void Flush() override;

private:
// EsParser implementation.
virtual bool ParseFromEsQueue() override;
virtual void ResetInternal() override;
bool ParseFromEsQueue() override;
void ResetInternal() override;

// Find the AUD located at or after |*stream_pos|.
// Return true if an AUD is found.
Expand Down
1 change: 0 additions & 1 deletion media/formats/mp2t/es_parser_h264_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class EsParserH264Test : public EsParserTestBase,
public testing::Test {
public:
EsParserH264Test() {}
virtual ~EsParserH264Test() {}

protected:
void LoadH264Stream(const char* filename);
Expand Down
8 changes: 4 additions & 4 deletions media/formats/mp2t/es_parser_mpeg1audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ class MEDIA_EXPORT EsParserMpeg1Audio : public EsParser {
EsParserMpeg1Audio(const NewAudioConfigCB& new_audio_config_cb,
const EmitBufferCB& emit_buffer_cb,
const LogCB& log_cb);
virtual ~EsParserMpeg1Audio();
~EsParserMpeg1Audio() override;

// EsParser implementation.
virtual void Flush() override;
void Flush() override;

private:
// Used to link a PTS with a byte position in the ES stream.
Expand All @@ -47,8 +47,8 @@ class MEDIA_EXPORT EsParserMpeg1Audio : public EsParser {
struct Mpeg1AudioFrame;

// EsParser implementation.
virtual bool ParseFromEsQueue() override;
virtual void ResetInternal() override;
bool ParseFromEsQueue() override;
void ResetInternal() override;

// Synchronize the stream on a Mpeg1 audio syncword (consuming bytes from
// |es_queue_| if needed).
Expand Down
1 change: 0 additions & 1 deletion media/formats/mp2t/es_parser_mpeg1audio_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class EsParserMpeg1AudioTest : public EsParserTestBase,
public testing::Test {
public:
EsParserMpeg1AudioTest();
virtual ~EsParserMpeg1AudioTest() {}

protected:
bool Process(const std::vector<Packet>& pes_packets, bool force_timing);
Expand Down
8 changes: 4 additions & 4 deletions media/formats/mp2t/mp2t_stream_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ class PidState;
class MEDIA_EXPORT Mp2tStreamParser : public StreamParser {
public:
explicit Mp2tStreamParser(bool sbr_in_mimetype);
virtual ~Mp2tStreamParser();
~Mp2tStreamParser() override;

// StreamParser implementation.
virtual void Init(
void Init(
const InitCB& init_cb,
const NewConfigCB& config_cb,
const NewBuffersCB& new_buffers_cb,
Expand All @@ -40,8 +40,8 @@ class MEDIA_EXPORT Mp2tStreamParser : public StreamParser {
const NewMediaSegmentCB& new_segment_cb,
const base::Closure& end_of_segment_cb,
const LogCB& log_cb) override;
virtual void Flush() override;
virtual bool Parse(const uint8* buf, int size) override;
void Flush() override;
bool Parse(const uint8* buf, int size) override;

private:
typedef std::map<int, PidState*> PidMap;
Expand Down
6 changes: 3 additions & 3 deletions media/formats/mp2t/ts_section_pat.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ class TsSectionPat : public TsSectionPsi {
typedef base::Callback<void(int, int)> RegisterPmtCb;

explicit TsSectionPat(const RegisterPmtCb& register_pmt_cb);
virtual ~TsSectionPat();
~TsSectionPat() override;

// TsSectionPsi implementation.
virtual bool ParsePsiSection(BitReader* bit_reader) override;
virtual void ResetPsiSection() override;
bool ParsePsiSection(BitReader* bit_reader) override;
void ResetPsiSection() override;

private:
RegisterPmtCb register_pmt_cb_;
Expand Down
8 changes: 4 additions & 4 deletions media/formats/mp2t/ts_section_pes.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ class TsSectionPes : public TsSection {
public:
TsSectionPes(scoped_ptr<EsParser> es_parser,
TimestampUnroller* timestamp_unroller);
virtual ~TsSectionPes();
~TsSectionPes() override;

// TsSection implementation.
virtual bool Parse(bool payload_unit_start_indicator,
bool Parse(bool payload_unit_start_indicator,
const uint8* buf, int size) override;
virtual void Flush() override;
virtual void Reset() override;
void Flush() override;
void Reset() override;

private:
// Emit a reassembled PES packet.
Expand Down
6 changes: 3 additions & 3 deletions media/formats/mp2t/ts_section_pmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ class TsSectionPmt : public TsSectionPsi {
typedef base::Callback<void(int, int)> RegisterPesCb;

explicit TsSectionPmt(const RegisterPesCb& register_pes_cb);
virtual ~TsSectionPmt();
~TsSectionPmt() override;

// Mpeg2TsPsiParser implementation.
virtual bool ParsePsiSection(BitReader* bit_reader) override;
virtual void ResetPsiSection() override;
bool ParsePsiSection(BitReader* bit_reader) override;
void ResetPsiSection() override;

private:
RegisterPesCb register_pes_cb_;
Expand Down
8 changes: 4 additions & 4 deletions media/formats/mp2t/ts_section_psi.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ namespace mp2t {
class TsSectionPsi : public TsSection {
public:
TsSectionPsi();
virtual ~TsSectionPsi();
~TsSectionPsi() override;

// TsSection implementation.
virtual bool Parse(bool payload_unit_start_indicator,
bool Parse(bool payload_unit_start_indicator,
const uint8* buf, int size) override;
virtual void Flush() override;
virtual void Reset() override;
void Flush() override;
void Reset() override;

// Parse the content of the PSI section.
virtual bool ParsePsiSection(BitReader* bit_reader) = 0;
Expand Down
6 changes: 3 additions & 3 deletions media/formats/mp4/box_definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ enum SampleFlags {

#define DECLARE_BOX_METHODS(T) \
T(); \
virtual ~T(); \
virtual bool Parse(BoxReader* reader) override; \
virtual FourCC BoxType() const override; \
~T() override; \
bool Parse(BoxReader* reader) override; \
FourCC BoxType() const override;

struct MEDIA_EXPORT FileType : Box {
DECLARE_BOX_METHODS(FileType);
Expand Down
14 changes: 7 additions & 7 deletions media/formats/mp4/box_reader_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ static const uint8 kSkipBox[] = {
0x00 };

struct FreeBox : Box {
virtual bool Parse(BoxReader* reader) override {
bool Parse(BoxReader* reader) override {
return true;
}
virtual FourCC BoxType() const override { return FOURCC_FREE; }
FourCC BoxType() const override { return FOURCC_FREE; }
};

struct PsshBox : Box {
uint32 val;

virtual bool Parse(BoxReader* reader) override {
bool Parse(BoxReader* reader) override {
return reader->Read4(&val);
}
virtual FourCC BoxType() const override { return FOURCC_PSSH; }
FourCC BoxType() const override { return FOURCC_PSSH; }
};

struct SkipBox : Box {
Expand All @@ -55,7 +55,7 @@ struct SkipBox : Box {
std::vector<PsshBox> kids;
FreeBox mpty;

virtual bool Parse(BoxReader* reader) override {
bool Parse(BoxReader* reader) override {
RCHECK(reader->ReadFullBoxHeader() &&
reader->Read1(&a) &&
reader->Read1(&b) &&
Expand All @@ -66,10 +66,10 @@ struct SkipBox : Box {
reader->ReadChildren(&kids) &&
reader->MaybeReadChild(&mpty);
}
virtual FourCC BoxType() const override { return FOURCC_SKIP; }
FourCC BoxType() const override { return FOURCC_SKIP; }

SkipBox();
virtual ~SkipBox();
~SkipBox() override;
};

SkipBox::SkipBox() {}
Expand Down
8 changes: 4 additions & 4 deletions media/formats/mp4/mp4_stream_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ class BoxReader;
class MEDIA_EXPORT MP4StreamParser : public StreamParser {
public:
MP4StreamParser(const std::set<int>& audio_object_types, bool has_sbr);
virtual ~MP4StreamParser();
~MP4StreamParser() override;

virtual void Init(
void Init(
const InitCB& init_cb,
const NewConfigCB& config_cb,
const NewBuffersCB& new_buffers_cb,
Expand All @@ -37,8 +37,8 @@ class MEDIA_EXPORT MP4StreamParser : public StreamParser {
const NewMediaSegmentCB& new_segment_cb,
const base::Closure& end_of_segment_cb,
const LogCB& log_cb) override;
virtual void Flush() override;
virtual bool Parse(const uint8* buf, int size) override;
void Flush() override;
bool Parse(const uint8* buf, int size) override;

private:
enum State {
Expand Down
4 changes: 1 addition & 3 deletions media/formats/mpeg/adts_stream_parser_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ namespace media {
class ADTSStreamParserTest : public StreamParserTestBase, public testing::Test {
public:
ADTSStreamParserTest()
: StreamParserTestBase(
scoped_ptr<StreamParser>(new ADTSStreamParser()).Pass()) {}
virtual ~ADTSStreamParserTest() {}
: StreamParserTestBase(make_scoped_ptr(new ADTSStreamParser())) {}
};

// Test parsing with small prime sized chunks to smoke out "power of
Expand Down
4 changes: 1 addition & 3 deletions media/formats/mpeg/mpeg1_audio_stream_parser_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ class MPEG1AudioStreamParserTest
: public StreamParserTestBase, public testing::Test {
public:
MPEG1AudioStreamParserTest()
: StreamParserTestBase(
scoped_ptr<StreamParser>(new MPEG1AudioStreamParser()).Pass()) {}
virtual ~MPEG1AudioStreamParserTest() {}
: StreamParserTestBase(make_scoped_ptr(new MPEG1AudioStreamParser())) {}
};

// Test parsing with small prime sized chunks to smoke out "power of
Expand Down

0 comments on commit 350a449

Please sign in to comment.