Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc

Issue 1833053004: [Extensions] Convert APIs to use movable types [10] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc
diff --git a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc
index 4080e03f26e82dc0df730ceee0a4f26d937cd572..7d8a25bf659ef18e340d129de8cdac56a0e5784d 100644
--- a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc
+++ b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc
@@ -225,15 +225,13 @@ void WebrtcAudioPrivateGetSinksFunction::OnOutputDeviceNames(
scoped_ptr<AudioDeviceNames> raw_ids) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- std::vector<linked_ptr<wap::SinkInfo> > results;
- for (AudioDeviceNames::const_iterator it = raw_ids->begin();
- it != raw_ids->end();
- ++it) {
- linked_ptr<wap::SinkInfo> info(new wap::SinkInfo);
- info->sink_id = CalculateHMACImpl(it->unique_id);
- info->sink_label = it->device_name;
+ std::vector<wap::SinkInfo> results;
+ for (const media::AudioDeviceName& name : *raw_ids) {
+ wap::SinkInfo info;
+ info.sink_id = CalculateHMACImpl(name.unique_id);
+ info.sink_label = name.device_name;
// TODO(joi): Add other parameters.
- results.push_back(info);
+ results.push_back(std::move(info));
}
// It's safe to directly set the results here (from a thread other

Powered by Google App Engine
This is Rietveld 408576698