summaryrefslogtreecommitdiffstats
path: root/media/audio/alsa
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-10-27 15:18:50 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-27 22:19:17 +0000
commit2dcbdb93081c00d3f0859edf7213a4490f3e671e (patch)
tree70e0c1d97ad97d2bc8a61c7d8427e199ca15dc04 /media/audio/alsa
parentcc12a6ab824a40524b5d046b8cd80253d19ff50f (diff)
downloadchromium_src-2dcbdb93081c00d3f0859edf7213a4490f3e671e.zip
chromium_src-2dcbdb93081c00d3f0859edf7213a4490f3e671e.tar.gz
chromium_src-2dcbdb93081c00d3f0859edf7213a4490f3e671e.tar.bz2
Standardize usage of virtual/override/final specifiers.
The Google C++ style guide states: Explicitly annotate overrides of virtual functions or virtual destructors with an override or (less frequently) final specifier. Older (pre-C++11) code will use the virtual keyword as an inferior alternative annotation. For clarity, use exactly one of override, final, or virtual when declaring an override. To better conform to these guidelines, the following constructs have been rewritten: - if a base class has a virtual destructor, then: virtual ~Foo(); -> ~Foo() override; - virtual void Foo() override; -> void Foo() override; - virtual void Foo() override final; -> void Foo() final; This patch was automatically generated. The clang plugin can generate fixit hints, which are suggested edits when it is 100% sure it knows how to fix a problem. The hints from the clang plugin were applied to the source tree using the tool in https://codereview.chromium.org/598073004. BUG=417463 R=wolenetz@chromium.org Review URL: https://codereview.chromium.org/661163004 Cr-Commit-Position: refs/heads/master@{#301462}
Diffstat (limited to 'media/audio/alsa')
-rw-r--r--media/audio/alsa/alsa_input.h18
-rw-r--r--media/audio/alsa/alsa_output.h14
-rw-r--r--media/audio/alsa/audio_manager_alsa.h32
3 files changed, 32 insertions, 32 deletions
diff --git a/media/audio/alsa/alsa_input.h b/media/audio/alsa/alsa_input.h
index ef7cb2c..b04e628 100644
--- a/media/audio/alsa/alsa_input.h
+++ b/media/audio/alsa/alsa_input.h
@@ -39,17 +39,17 @@ class AlsaPcmInputStream : public AgcAudioStream<AudioInputStream> {
const AudioParameters& params,
AlsaWrapper* wrapper);
- virtual ~AlsaPcmInputStream();
+ ~AlsaPcmInputStream() override;
// Implementation of AudioInputStream.
- virtual bool Open() override;
- virtual void Start(AudioInputCallback* callback) override;
- virtual void Stop() override;
- virtual void Close() override;
- virtual double GetMaxVolume() override;
- virtual void SetVolume(double volume) override;
- virtual double GetVolume() override;
- virtual bool IsMuted() override;
+ bool Open() override;
+ void Start(AudioInputCallback* callback) override;
+ void Stop() override;
+ void Close() override;
+ double GetMaxVolume() override;
+ void SetVolume(double volume) override;
+ double GetVolume() override;
+ bool IsMuted() override;
private:
// Logs the error and invokes any registered callbacks.
diff --git a/media/audio/alsa/alsa_output.h b/media/audio/alsa/alsa_output.h
index dfc044d..fd0910a 100644
--- a/media/audio/alsa/alsa_output.h
+++ b/media/audio/alsa/alsa_output.h
@@ -72,15 +72,15 @@ class MEDIA_EXPORT AlsaPcmOutputStream : public AudioOutputStream {
AlsaWrapper* wrapper,
AudioManagerBase* manager);
- virtual ~AlsaPcmOutputStream();
+ ~AlsaPcmOutputStream() override;
// Implementation of AudioOutputStream.
- virtual bool Open() override;
- virtual void Close() override;
- virtual void Start(AudioSourceCallback* callback) override;
- virtual void Stop() override;
- virtual void SetVolume(double volume) override;
- virtual void GetVolume(double* volume) override;
+ bool Open() override;
+ void Close() override;
+ void Start(AudioSourceCallback* callback) override;
+ void Stop() override;
+ void SetVolume(double volume) override;
+ void GetVolume(double* volume) override;
private:
friend class AlsaPcmOutputStreamTest;
diff --git a/media/audio/alsa/audio_manager_alsa.h b/media/audio/alsa/audio_manager_alsa.h
index 40801fc..46a28b1 100644
--- a/media/audio/alsa/audio_manager_alsa.h
+++ b/media/audio/alsa/audio_manager_alsa.h
@@ -22,31 +22,31 @@ class MEDIA_EXPORT AudioManagerAlsa : public AudioManagerBase {
static void ShowLinuxAudioInputSettings();
// Implementation of AudioManager.
- virtual bool HasAudioOutputDevices() override;
- virtual bool HasAudioInputDevices() override;
- virtual void ShowAudioInputSettings() override;
- virtual void GetAudioInputDeviceNames(
- AudioDeviceNames* device_names) override;
- virtual void GetAudioOutputDeviceNames(
- AudioDeviceNames* device_names) override;
- virtual AudioParameters GetInputStreamParameters(
+ bool HasAudioOutputDevices() override;
+ bool HasAudioInputDevices() override;
+ void ShowAudioInputSettings() override;
+ void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
+ void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override;
+ AudioParameters GetInputStreamParameters(
const std::string& device_id) override;
// Implementation of AudioManagerBase.
- virtual AudioOutputStream* MakeLinearOutputStream(
+ AudioOutputStream* MakeLinearOutputStream(
const AudioParameters& params) override;
- virtual AudioOutputStream* MakeLowLatencyOutputStream(
+ AudioOutputStream* MakeLowLatencyOutputStream(
+ const AudioParameters& params,
+ const std::string& device_id) override;
+ AudioInputStream* MakeLinearInputStream(
+ const AudioParameters& params,
+ const std::string& device_id) override;
+ AudioInputStream* MakeLowLatencyInputStream(
const AudioParameters& params,
const std::string& device_id) override;
- virtual AudioInputStream* MakeLinearInputStream(
- const AudioParameters& params, const std::string& device_id) override;
- virtual AudioInputStream* MakeLowLatencyInputStream(
- const AudioParameters& params, const std::string& device_id) override;
protected:
- virtual ~AudioManagerAlsa();
+ ~AudioManagerAlsa() override;
- virtual AudioParameters GetPreferredOutputStreamParameters(
+ AudioParameters GetPreferredOutputStreamParameters(
const std::string& output_device_id,
const AudioParameters& input_params) override;