Roll chromium_revision e144d30..6fdb142 (318658:318841) + remove OVERRIDE macro

Clang version changed 223108:230914
Details: https://chromium.googlesource.com/chromium/src/+/e144d30..6fdb142/tools/clang/scripts/update.sh

Removes the OVERRIDE macro defined in:
* webrtc/base/common.h
* webrtc/typedefs.h

The majority of the source changes were done by running this in src/:
perl -0pi -e "s/virtual\s([^({;]*(\([^({;]*\)[^({;]*))(OVERRIDE|override)/\1override/sg" `find {talk,webrtc} -name "*.h"  -o -name "*.cc*" -o -name "*.mm*"`

which converted all:
virtual Foo() OVERRIDE
functions to:
Foo() override

Then I manually edited:
* talk/media/webrtc/fakewebrtccommon.h
* webrtc/test/fake_common.h

Remaining uses of OVERRIDE was fixed by search+replace.

Manual edits were done to fix virtual destructors that were
overriding inherited ones.

Finally a build error related to the pure virtual definitions of
Read, Write and Rewind in common_types.h required a bit of
refactoring in:
* webrtc/common_types.cc
* webrtc/common_types.h
* webrtc/system_wrappers/interface/file_wrapper.h
* webrtc/system_wrappers/source/file_impl.cc

This roll should make it possible for us to finally re-enable deadlock
detection for TSan on the buildbots.

BUG=4106
R=pbos@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41069004

Cr-Commit-Position: refs/heads/master@{#8596}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8596 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_coding/neteq/accelerate.h b/webrtc/modules/audio_coding/neteq/accelerate.h
index 2da9993..6e3aa46 100644
--- a/webrtc/modules/audio_coding/neteq/accelerate.h
+++ b/webrtc/modules/audio_coding/neteq/accelerate.h
@@ -49,16 +49,18 @@
  protected:
   // Sets the parameters |best_correlation| and |peak_index| to suitable
   // values when the signal contains no active speech.
-  virtual void SetParametersForPassiveSpeech(size_t len,
-                                             int16_t* best_correlation,
-                                             int* peak_index) const OVERRIDE;
+  void SetParametersForPassiveSpeech(size_t len,
+                                     int16_t* best_correlation,
+                                     int* peak_index) const override;
 
   // Checks the criteria for performing the time-stretching operation and,
   // if possible, performs the time-stretching.
-  virtual ReturnCodes CheckCriteriaAndStretch(
-      const int16_t* input, size_t input_length, size_t peak_index,
-      int16_t best_correlation, bool active_speech,
-      AudioMultiVector* output) const OVERRIDE;
+  ReturnCodes CheckCriteriaAndStretch(const int16_t* input,
+                                      size_t input_length,
+                                      size_t peak_index,
+                                      int16_t best_correlation,
+                                      bool active_speech,
+                                      AudioMultiVector* output) const override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(Accelerate);
diff --git a/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h b/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h
index 7d36a39..7e80a36 100644
--- a/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h
+++ b/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h
@@ -233,7 +233,7 @@
                              uint32_t rtp_timestamp,
                              uint32_t arrival_timestamp) { return -1; }
 
-  virtual CNG_dec_inst* CngDecoderInstance() OVERRIDE { return dec_state_; }
+  CNG_dec_inst* CngDecoderInstance() override { return dec_state_; }
 
  private:
   CNG_dec_inst* dec_state_;
diff --git a/webrtc/modules/audio_coding/neteq/decision_logic_fax.h b/webrtc/modules/audio_coding/neteq/decision_logic_fax.h
index 01a948f..97c481d 100644
--- a/webrtc/modules/audio_coding/neteq/decision_logic_fax.h
+++ b/webrtc/modules/audio_coding/neteq/decision_logic_fax.h
@@ -47,13 +47,13 @@
   // should be set to true. The output variable |reset_decoder| will be set to
   // true if a reset is required; otherwise it is left unchanged (i.e., it can
   // remain true if it was true before the call).
-  virtual Operations GetDecisionSpecialized(const SyncBuffer& sync_buffer,
-                                            const Expand& expand,
-                                            int decoder_frame_length,
-                                            const RTPHeader* packet_header,
-                                            Modes prev_mode,
-                                            bool play_dtmf,
-                                            bool* reset_decoder) OVERRIDE;
+  Operations GetDecisionSpecialized(const SyncBuffer& sync_buffer,
+                                    const Expand& expand,
+                                    int decoder_frame_length,
+                                    const RTPHeader* packet_header,
+                                    Modes prev_mode,
+                                    bool play_dtmf,
+                                    bool* reset_decoder) override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(DecisionLogicFax);
diff --git a/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
index 8a382e9..28e901e 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
@@ -378,7 +378,7 @@
 
 class ShortTimestampJumpTest : public LargeTimestampJumpTest {
  protected:
-  void UpdateState(NetEqOutputType output_type) OVERRIDE {
+  void UpdateState(NetEqOutputType output_type) override {
     switch (test_state_) {
       case kInitialPhase: {
         if (output_type == kOutputNormal) {
diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl.h b/webrtc/modules/audio_coding/neteq/neteq_impl.h
index b82b43e..ac4689b 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_impl.h
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl.h
@@ -79,10 +79,10 @@
   // of the time when the packet was received, and should be measured with
   // the same tick rate as the RTP timestamp of the current payload.
   // Returns 0 on success, -1 on failure.
-  virtual int InsertPacket(const WebRtcRTPHeader& rtp_header,
-                           const uint8_t* payload,
-                           size_t length_bytes,
-                           uint32_t receive_timestamp) OVERRIDE;
+  int InsertPacket(const WebRtcRTPHeader& rtp_header,
+                   const uint8_t* payload,
+                   size_t length_bytes,
+                   uint32_t receive_timestamp) override;
 
   // Inserts a sync-packet into packet queue. Sync-packets are decoded to
   // silence and are intended to keep AV-sync intact in an event of long packet
@@ -93,8 +93,8 @@
   // type, i.e. they cannot have DTMF or CNG payload type, nor a codec change
   // can be implied by inserting a sync-packet.
   // Returns kOk on success, kFail on failure.
-  virtual int InsertSyncPacket(const WebRtcRTPHeader& rtp_header,
-                               uint32_t receive_timestamp) OVERRIDE;
+  int InsertSyncPacket(const WebRtcRTPHeader& rtp_header,
+                       uint32_t receive_timestamp) override;
 
   // Instructs NetEq to deliver 10 ms of audio data. The data is written to
   // |output_audio|, which can hold (at least) |max_length| elements.
@@ -104,97 +104,98 @@
   // the samples are interleaved.
   // The speech type is written to |type|, if |type| is not NULL.
   // Returns kOK on success, or kFail in case of an error.
-  virtual int GetAudio(size_t max_length, int16_t* output_audio,
-                       int* samples_per_channel, int* num_channels,
-                       NetEqOutputType* type) OVERRIDE;
+  int GetAudio(size_t max_length,
+               int16_t* output_audio,
+               int* samples_per_channel,
+               int* num_channels,
+               NetEqOutputType* type) override;
 
   // Associates |rtp_payload_type| with |codec| and stores the information in
   // the codec database. Returns kOK on success, kFail on failure.
-  virtual int RegisterPayloadType(enum NetEqDecoder codec,
-                                  uint8_t rtp_payload_type) OVERRIDE;
+  int RegisterPayloadType(enum NetEqDecoder codec,
+                          uint8_t rtp_payload_type) override;
 
   // Provides an externally created decoder object |decoder| to insert in the
   // decoder database. The decoder implements a decoder of type |codec| and
   // associates it with |rtp_payload_type|. Returns kOK on success, kFail on
   // failure.
-  virtual int RegisterExternalDecoder(AudioDecoder* decoder,
-                                      enum NetEqDecoder codec,
-                                      uint8_t rtp_payload_type) OVERRIDE;
+  int RegisterExternalDecoder(AudioDecoder* decoder,
+                              enum NetEqDecoder codec,
+                              uint8_t rtp_payload_type) override;
 
   // Removes |rtp_payload_type| from the codec database. Returns 0 on success,
   // -1 on failure.
-  virtual int RemovePayloadType(uint8_t rtp_payload_type) OVERRIDE;
+  int RemovePayloadType(uint8_t rtp_payload_type) override;
 
-  virtual bool SetMinimumDelay(int delay_ms) OVERRIDE;
+  bool SetMinimumDelay(int delay_ms) override;
 
-  virtual bool SetMaximumDelay(int delay_ms) OVERRIDE;
+  bool SetMaximumDelay(int delay_ms) override;
 
-  virtual int LeastRequiredDelayMs() const OVERRIDE;
+  int LeastRequiredDelayMs() const override;
 
-  virtual int SetTargetDelay() OVERRIDE { return kNotImplemented; }
+  int SetTargetDelay() override { return kNotImplemented; }
 
-  virtual int TargetDelay() OVERRIDE { return kNotImplemented; }
+  int TargetDelay() override { return kNotImplemented; }
 
-  virtual int CurrentDelay() OVERRIDE { return kNotImplemented; }
+  int CurrentDelay() override { return kNotImplemented; }
 
   // Sets the playout mode to |mode|.
   // Deprecated.
   // TODO(henrik.lundin) Delete.
-  virtual void SetPlayoutMode(NetEqPlayoutMode mode) OVERRIDE;
+  void SetPlayoutMode(NetEqPlayoutMode mode) override;
 
   // Returns the current playout mode.
   // Deprecated.
   // TODO(henrik.lundin) Delete.
-  virtual NetEqPlayoutMode PlayoutMode() const OVERRIDE;
+  NetEqPlayoutMode PlayoutMode() const override;
 
   // Writes the current network statistics to |stats|. The statistics are reset
   // after the call.
-  virtual int NetworkStatistics(NetEqNetworkStatistics* stats) OVERRIDE;
+  int NetworkStatistics(NetEqNetworkStatistics* stats) override;
 
   // Writes the last packet waiting times (in ms) to |waiting_times|. The number
   // of values written is no more than 100, but may be smaller if the interface
   // is polled again before 100 packets has arrived.
-  virtual void WaitingTimes(std::vector<int>* waiting_times) OVERRIDE;
+  void WaitingTimes(std::vector<int>* waiting_times) override;
 
   // Writes the current RTCP statistics to |stats|. The statistics are reset
   // and a new report period is started with the call.
-  virtual void GetRtcpStatistics(RtcpStatistics* stats) OVERRIDE;
+  void GetRtcpStatistics(RtcpStatistics* stats) override;
 
   // Same as RtcpStatistics(), but does not reset anything.
-  virtual void GetRtcpStatisticsNoReset(RtcpStatistics* stats) OVERRIDE;
+  void GetRtcpStatisticsNoReset(RtcpStatistics* stats) override;
 
   // Enables post-decode VAD. When enabled, GetAudio() will return
   // kOutputVADPassive when the signal contains no speech.
-  virtual void EnableVad() OVERRIDE;
+  void EnableVad() override;
 
   // Disables post-decode VAD.
-  virtual void DisableVad() OVERRIDE;
+  void DisableVad() override;
 
-  virtual bool GetPlayoutTimestamp(uint32_t* timestamp) OVERRIDE;
+  bool GetPlayoutTimestamp(uint32_t* timestamp) override;
 
-  virtual int SetTargetNumberOfChannels() OVERRIDE { return kNotImplemented; }
+  int SetTargetNumberOfChannels() override { return kNotImplemented; }
 
-  virtual int SetTargetSampleRate() OVERRIDE { return kNotImplemented; }
+  int SetTargetSampleRate() override { return kNotImplemented; }
 
   // Returns the error code for the last occurred error. If no error has
   // occurred, 0 is returned.
-  virtual int LastError() const OVERRIDE;
+  int LastError() const override;
 
   // Returns the error code last returned by a decoder (audio or comfort noise).
   // When LastError() returns kDecoderErrorCode or kComfortNoiseErrorCode, check
   // this method to get the decoder's error code.
-  virtual int LastDecoderError() OVERRIDE;
+  int LastDecoderError() override;
 
   // Flushes both the packet buffer and the sync buffer.
-  virtual void FlushBuffers() OVERRIDE;
+  void FlushBuffers() override;
 
-  virtual void PacketBufferStatistics(int* current_num_packets,
-                                      int* max_num_packets) const OVERRIDE;
+  void PacketBufferStatistics(int* current_num_packets,
+                              int* max_num_packets) const override;
 
   // Get sequence number and timestamp of the latest RTP.
   // This method is to facilitate NACK.
-  virtual int DecodedRtpInfo(int* sequence_number,
-                             uint32_t* timestamp) const OVERRIDE;
+  int DecodedRtpInfo(int* sequence_number, uint32_t* timestamp) const override;
 
   // This accessor method is only intended for testing purposes.
   const SyncBuffer* sync_buffer_for_test() const;
diff --git a/webrtc/modules/audio_coding/neteq/test/NETEQTEST_DummyRTPpacket.h b/webrtc/modules/audio_coding/neteq/test/NETEQTEST_DummyRTPpacket.h
index 9f09c94..1ac6c9a 100644
--- a/webrtc/modules/audio_coding/neteq/test/NETEQTEST_DummyRTPpacket.h
+++ b/webrtc/modules/audio_coding/neteq/test/NETEQTEST_DummyRTPpacket.h
@@ -15,9 +15,9 @@
 
 class NETEQTEST_DummyRTPpacket : public NETEQTEST_RTPpacket {
  public:
-  virtual int readFromFile(FILE* fp) OVERRIDE;
-  virtual int writeToFile(FILE* fp) OVERRIDE;
-  virtual void parseHeader() OVERRIDE;
+  int readFromFile(FILE* fp) override;
+  int writeToFile(FILE* fp) override;
+  void parseHeader() override;
 };
 
 #endif  // NETEQTEST_DUMMYRTPPACKET_H
diff --git a/webrtc/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc b/webrtc/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc
index b672a0c..7abf5a1 100644
--- a/webrtc/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc
+++ b/webrtc/modules/audio_coding/neteq/test/neteq_isac_quality_test.cc
@@ -88,8 +88,8 @@
 class NetEqIsacQualityTest : public NetEqQualityTest {
  protected:
   NetEqIsacQualityTest();
-  virtual void SetUp() OVERRIDE;
-  virtual void TearDown() OVERRIDE;
+  void SetUp() override;
+  void TearDown() override;
   virtual int EncodeBlock(int16_t* in_data, int block_size_samples,
                           uint8_t* payload, int max_bytes);
  private:
diff --git a/webrtc/modules/audio_coding/neteq/test/neteq_opus_fec_quality_test.cc b/webrtc/modules/audio_coding/neteq/test/neteq_opus_fec_quality_test.cc
index e1f53af..55ef0c7 100644
--- a/webrtc/modules/audio_coding/neteq/test/neteq_opus_fec_quality_test.cc
+++ b/webrtc/modules/audio_coding/neteq/test/neteq_opus_fec_quality_test.cc
@@ -116,8 +116,8 @@
 class NetEqOpusFecQualityTest : public NetEqQualityTest {
  protected:
   NetEqOpusFecQualityTest();
-  virtual void SetUp() OVERRIDE;
-  virtual void TearDown() OVERRIDE;
+  void SetUp() override;
+  void TearDown() override;
   virtual int EncodeBlock(int16_t* in_data, int block_size_samples,
                           uint8_t* payload, int max_bytes);
  private:
diff --git a/webrtc/modules/audio_coding/neteq/tools/audio_checksum.h b/webrtc/modules/audio_coding/neteq/tools/audio_checksum.h
index 173713a..b4a6a81 100644
--- a/webrtc/modules/audio_coding/neteq/tools/audio_checksum.h
+++ b/webrtc/modules/audio_coding/neteq/tools/audio_checksum.h
@@ -26,7 +26,7 @@
  public:
   AudioChecksum() : finished_(false) {}
 
-  virtual bool WriteArray(const int16_t* audio, size_t num_samples) OVERRIDE {
+  bool WriteArray(const int16_t* audio, size_t num_samples) override {
     if (finished_)
       return false;
 
diff --git a/webrtc/modules/audio_coding/neteq/tools/audio_sink.h b/webrtc/modules/audio_coding/neteq/tools/audio_sink.h
index 474ec1c..b7b3ed1 100644
--- a/webrtc/modules/audio_coding/neteq/tools/audio_sink.h
+++ b/webrtc/modules/audio_coding/neteq/tools/audio_sink.h
@@ -47,7 +47,7 @@
   AudioSinkFork(AudioSink* left, AudioSink* right)
       : left_sink_(left), right_sink_(right) {}
 
-  virtual bool WriteArray(const int16_t* audio, size_t num_samples) OVERRIDE {
+  bool WriteArray(const int16_t* audio, size_t num_samples) override {
     return left_sink_->WriteArray(audio, num_samples) &&
            right_sink_->WriteArray(audio, num_samples);
   }
diff --git a/webrtc/modules/audio_coding/neteq/tools/constant_pcm_packet_source.h b/webrtc/modules/audio_coding/neteq/tools/constant_pcm_packet_source.h
index fcf4f13..b780fbf 100644
--- a/webrtc/modules/audio_coding/neteq/tools/constant_pcm_packet_source.h
+++ b/webrtc/modules/audio_coding/neteq/tools/constant_pcm_packet_source.h
@@ -33,7 +33,7 @@
 
   // Returns a pointer to the next packet. Will never return NULL. That is,
   // the source is infinite.
-  Packet* NextPacket() OVERRIDE;
+  Packet* NextPacket() override;
 
  private:
   void WriteHeader(uint8_t* packet_memory);
diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h b/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h
index 6207fde..cb40b1c 100644
--- a/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h
+++ b/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h
@@ -33,13 +33,13 @@
 
 class NoLoss : public LossModel {
  public:
-  virtual bool Lost() OVERRIDE;
+  bool Lost() override;
 };
 
 class UniformLoss : public LossModel {
  public:
   UniformLoss(double loss_rate);
-  virtual bool Lost() OVERRIDE;
+  bool Lost() override;
   void set_loss_rate(double loss_rate) { loss_rate_ = loss_rate; }
 
  private:
@@ -49,7 +49,7 @@
 class GilbertElliotLoss : public LossModel {
  public:
   GilbertElliotLoss(double prob_trans_11, double prob_trans_01);
-  virtual bool Lost() OVERRIDE;
+  bool Lost() override;
 
  private:
   // Prob. of losing current packet, when previous packet is lost.
@@ -69,8 +69,8 @@
                    int channels,
                    std::string in_filename,
                    std::string out_filename);
-  virtual void SetUp() OVERRIDE;
-  virtual void TearDown() OVERRIDE;
+  void SetUp() override;
+  void TearDown() override;
 
   // EncodeBlock(...) does the following:
   // 1. encodes a block of audio, saved in |in_data| and has a length of
diff --git a/webrtc/modules/audio_coding/neteq/tools/output_audio_file.h b/webrtc/modules/audio_coding/neteq/tools/output_audio_file.h
index 1d61280..ff30f67 100644
--- a/webrtc/modules/audio_coding/neteq/tools/output_audio_file.h
+++ b/webrtc/modules/audio_coding/neteq/tools/output_audio_file.h
@@ -34,7 +34,7 @@
       fclose(out_file_);
   }
 
-  virtual bool WriteArray(const int16_t* audio, size_t num_samples) OVERRIDE {
+  bool WriteArray(const int16_t* audio, size_t num_samples) override {
     assert(out_file_);
     return fwrite(audio, sizeof(*audio), num_samples, out_file_) == num_samples;
   }
diff --git a/webrtc/modules/audio_coding/neteq/tools/output_wav_file.h b/webrtc/modules/audio_coding/neteq/tools/output_wav_file.h
index 1f72162..1b1ed42 100644
--- a/webrtc/modules/audio_coding/neteq/tools/output_wav_file.h
+++ b/webrtc/modules/audio_coding/neteq/tools/output_wav_file.h
@@ -27,7 +27,7 @@
   OutputWavFile(const std::string& file_name, int sample_rate_hz)
       : wav_writer_(file_name, sample_rate_hz, 1) {}
 
-  virtual bool WriteArray(const int16_t* audio, size_t num_samples) OVERRIDE {
+  bool WriteArray(const int16_t* audio, size_t num_samples) override {
     wav_writer_.WriteSamples(audio, num_samples);
     return true;
   }
diff --git a/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h b/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h
index 70b5216..d711685 100644
--- a/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h
+++ b/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h
@@ -41,7 +41,7 @@
 
   // Returns a pointer to the next packet. Returns NULL if end of file was
   // reached, or if a the data was corrupt.
-  virtual Packet* NextPacket() OVERRIDE;
+  Packet* NextPacket() override;
 
  private:
   static const int kFirstLineLength = 40;
diff --git a/webrtc/modules/audio_coding/neteq/tools/rtp_generator.h b/webrtc/modules/audio_coding/neteq/tools/rtp_generator.h
index 2280436..e09f6e4 100644
--- a/webrtc/modules/audio_coding/neteq/tools/rtp_generator.h
+++ b/webrtc/modules/audio_coding/neteq/tools/rtp_generator.h
@@ -70,7 +70,7 @@
 
   uint32_t GetRtpHeader(uint8_t payload_type,
                         size_t payload_length_samples,
-                        WebRtcRTPHeader* rtp_header) OVERRIDE;
+                        WebRtcRTPHeader* rtp_header) override;
 
  private:
   uint32_t jump_from_timestamp_;