Chromium Code Reviews| Index: chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_browsertest.cc |
| diff --git a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_browsertest.cc b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_browsertest.cc |
| index 2463eb8f6e83672011839f6503a0ffce07f8e0ed..6afdba808e9a1412c8337c9f6c863e7ec641d544 100644 |
| --- a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_browsertest.cc |
| +++ b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_browsertest.cc |
| @@ -43,7 +43,7 @@ |
| using base::JSONWriter; |
| using content::RenderProcessHost; |
| using content::WebContents; |
| -using media::AudioDeviceNames; |
| +using media::AudioDeviceDescriptions; |
| using media::AudioManager; |
| namespace extensions { |
| @@ -129,22 +129,22 @@ class WebrtcAudioPrivateTest : public AudioWaitingExtensionTest { |
| // Synchronously (from the calling thread's point of view) runs the |
| // given enumeration function on the device thread. On return, |
| - // |device_names| has been filled with the device names resulting |
| - // from that call. |
| - void GetAudioDeviceNames( |
| - void (AudioManager::*EnumerationFunc)(AudioDeviceNames*), |
| - AudioDeviceNames* device_names) { |
| + // |device_descriptions| has been filled with the device descriptions |
| + // resulting from that call. |
| + void GetAudioDeviceDescriptions( |
| + void (AudioManager::*EnumerationFunc)(AudioDeviceDescriptions*), |
| + AudioDeviceDescriptions* device_descriptions) { |
| AudioManager* audio_manager = AudioManager::Get(); |
| if (!audio_manager->GetTaskRunner()->BelongsToCurrentThread()) { |
| audio_manager->GetTaskRunner()->PostTask( |
| FROM_HERE, |
| - base::Bind(&WebrtcAudioPrivateTest::GetAudioDeviceNames, |
| - base::Unretained(this), |
| - EnumerationFunc, device_names)); |
| + base::Bind(&WebrtcAudioPrivateTest::GetAudioDeviceDescriptions, |
| + base::Unretained(this), EnumerationFunc, |
| + device_descriptions)); |
| enumeration_event_.Wait(); |
| } else { |
| - (audio_manager->*EnumerationFunc)(device_names); |
| + (audio_manager->*EnumerationFunc)(device_descriptions); |
| enumeration_event_.Signal(); |
| } |
| } |
| @@ -181,8 +181,9 @@ class WebrtcAudioPrivateTest : public AudioWaitingExtensionTest { |
| #if !defined(OS_MACOSX) |
| // http://crbug.com/334579 |
| IN_PROC_BROWSER_TEST_F(WebrtcAudioPrivateTest, GetSinks) { |
| - AudioDeviceNames devices; |
| - GetAudioDeviceNames(&AudioManager::GetAudioOutputDeviceNames, &devices); |
| + AudioDeviceDescriptions devices; |
| + GetAudioDeviceDescriptions(&AudioManager::GetAudioOutputDeviceDescriptions, |
| + &devices); |
| base::ListValue* sink_list = NULL; |
| std::unique_ptr<base::Value> result = InvokeGetSinks(&sink_list); |
| @@ -196,7 +197,7 @@ IN_PROC_BROWSER_TEST_F(WebrtcAudioPrivateTest, GetSinks) { |
| // Iterate through both lists in lockstep and compare. The order |
| // should be identical. |
| size_t ix = 0; |
| - AudioDeviceNames::const_iterator it = devices.begin(); |
| + AudioDeviceDescriptions::const_iterator it = devices.begin(); |
| for (; ix < sink_list->GetSize() && it != devices.end(); |
| ++ix, ++it) { |
| base::DictionaryValue* dict = NULL; |
| @@ -332,13 +333,13 @@ IN_PROC_BROWSER_TEST_F(WebrtcAudioPrivateTest, GetAssociatedSink) { |
| // Get the list of input devices. We can cheat in the unit test and |
| // run this on the main thread since nobody else will be running at |
| // the same time. |
| - AudioDeviceNames devices; |
| - GetAudioDeviceNames(&AudioManager::GetAudioInputDeviceNames, &devices); |
| + AudioDeviceDescriptions devices; |
| + GetAudioDeviceDescriptions(&AudioManager::GetAudioInputDeviceDescriptions, |
| + &devices); |
| // Try to get an associated sink for each source. |
| - for (AudioDeviceNames::const_iterator device = devices.begin(); |
| - device != devices.end(); |
| - ++device) { |
| + for (AudioDeviceDescriptions::const_iterator device = devices.begin(); |
|
Guido Urdaneta
2016/12/08 15:53:36
nit: consider switching to range for
o1ka
2016/12/09 14:56:30
Done.
|
| + device != devices.end(); ++device) { |
| scoped_refptr<WebrtcAudioPrivateGetAssociatedSinkFunction> function = |
| new WebrtcAudioPrivateGetAssociatedSinkFunction(); |
| function->set_source_url(source_url_); |