diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-03 18:29:00 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-03 18:29:00 +0000 |
commit | d2bdede997ce7f623574c1cd6303bbf16b55c3be (patch) | |
tree | 401fadb1c2b74638b3700c2858571d146e0fc6ba | |
parent | 3e4aa6e56c53980620c8a19a338cd3a1767b37e0 (diff) | |
download | chromium_src-d2bdede997ce7f623574c1cd6303bbf16b55c3be.zip chromium_src-d2bdede997ce7f623574c1cd6303bbf16b55c3be.tar.gz chromium_src-d2bdede997ce7f623574c1cd6303bbf16b55c3be.tar.bz2 |
Correct include guard, and enforce array parameter starts empty.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/23687004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220984 0039d316-1c4b-4281-b951-d872f2087c98
6 files changed, 9 insertions, 9 deletions
diff --git a/content/browser/renderer_host/media/device_request_message_filter.cc b/content/browser/renderer_host/media/device_request_message_filter.cc index 770e800..1ebfa1a 100644 --- a/content/browser/renderer_host/media/device_request_message_filter.cc +++ b/content/browser/renderer_host/media/device_request_message_filter.cc @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - #include "content/browser/renderer_host/media/device_request_message_filter.h" #include "base/strings/string_number_conversions.h" diff --git a/content/browser/renderer_host/media/device_request_message_filter.h b/content/browser/renderer_host/media/device_request_message_filter.h index 048e215..b684954 100644 --- a/content/browser/renderer_host/media/device_request_message_filter.h +++ b/content/browser/renderer_host/media/device_request_message_filter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_CENTER_HOST_H_ -#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_CENTER_HOST_H_ +#ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_DEVICE_REQUEST_MESSAGE_FILTER_H_ +#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_DEVICE_REQUEST_MESSAGE_FILTER_H_ #include <map> #include <string> @@ -75,4 +75,4 @@ class CONTENT_EXPORT DeviceRequestMessageFilter : public BrowserMessageFilter, } // namespace content -#endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_CENTER_HOST_H_ +#endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_DEVICE_REQUEST_MESSAGE_FILTER_H_ diff --git a/content/browser/renderer_host/media/media_stream_manager_unittest.cc b/content/browser/renderer_host/media/media_stream_manager_unittest.cc index 9141371..a67237a 100644 --- a/content/browser/renderer_host/media/media_stream_manager_unittest.cc +++ b/content/browser/renderer_host/media/media_stream_manager_unittest.cc @@ -50,6 +50,7 @@ class MockAudioManager : public AudioManagerPlatform { virtual void GetAudioInputDeviceNames( media::AudioDeviceNames* device_names) OVERRIDE { + DCHECK(device_names->empty()); if (HasAudioInputDevices()) { AudioManagerBase::GetAudioInputDeviceNames(device_names); } else { diff --git a/media/audio/audio_manager.h b/media/audio/audio_manager.h index 59104f7..2813d54 100644 --- a/media/audio/audio_manager.h +++ b/media/audio/audio_manager.h @@ -58,8 +58,9 @@ class MEDIA_EXPORT AudioManager { // threads to avoid blocking the rest of the application. virtual void ShowAudioInputSettings() = 0; - // Appends a list of available input devices. It is not guaranteed that - // all the devices in the list support all formats and sample rates for + // Appends a list of available input devices to |device_names|, + // which must initially be empty. It is not guaranteed that all the + // devices in the list support all formats and sample rates for // recording. virtual void GetAudioInputDeviceNames(AudioDeviceNames* device_names) = 0; diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc index 3a2e16a..21b9318 100644 --- a/media/audio/mac/audio_manager_mac.cc +++ b/media/audio/mac/audio_manager_mac.cc @@ -83,9 +83,6 @@ bool AudioManagerMac::HasUnifiedDefaultIO() { static void GetAudioDeviceInfo(bool is_input, media::AudioDeviceNames* device_names) { - DCHECK(device_names); - device_names->clear(); - // Query the number of total devices. AudioObjectPropertyAddress property_address = { kAudioHardwarePropertyDevices, @@ -397,6 +394,7 @@ int AudioManagerMac::HardwareSampleRate() { void AudioManagerMac::GetAudioInputDeviceNames( media::AudioDeviceNames* device_names) { + DCHECK(device_names->empty()); GetAudioDeviceInfo(true, device_names); if (!device_names->empty()) { // Prepend the default device to the list since we always want it to be diff --git a/media/audio/win/audio_manager_win.cc b/media/audio/win/audio_manager_win.cc index 4614c34..1d5538f 100644 --- a/media/audio/win/audio_manager_win.cc +++ b/media/audio/win/audio_manager_win.cc @@ -242,6 +242,7 @@ void AudioManagerWin::ShowAudioInputSettings() { void AudioManagerWin::GetAudioInputDeviceNames( media::AudioDeviceNames* device_names) { + DCHECK(device_names->empty()); DCHECK(enumeration_type() != kUninitializedEnumeration); // Enumerate all active audio-endpoint capture devices. if (enumeration_type() == kWaveEnumeration) { |