From 1cb4c0e1be53447096ae11f820bb408b71184682 Mon Sep 17 00:00:00 2001 From: "rdevlin.cronin" Date: Thu, 24 Mar 2016 13:52:17 -0700 Subject: [Extensions] Convert APIs to use movable types [3] Generated extensions code used to rely on linked_ptrs for non-copyable types in containers. Now, we can make these types movable. Update the following APIs to use movable types in this CL: - browser.idl - browsing_data.json - cast_devices_private.idl - cast_streaming_receiver_session.idl - cast_streaming_rtp_stream.idl - cast_streaming_session.idl - cast_streaming_udp_transport.idl - certificate_provider.idl - certificate_provider_internal.idl - chrome_web_view_internal.json - chromeos_info_private.json - cloud_print_private.json - command_line_private.json - commands.json - content_settings.json - context_menus.json - context_menus_internal.json - cookies.json - copresence.idl - copresence_private.idl BUG=595949 Review URL: https://codereview.chromium.org/1828683002 Cr-Commit-Position: refs/heads/master@{#383142} --- chrome/renderer/extensions/cast_streaming_native_handler.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'chrome/renderer/extensions/cast_streaming_native_handler.cc') diff --git a/chrome/renderer/extensions/cast_streaming_native_handler.cc b/chrome/renderer/extensions/cast_streaming_native_handler.cc index 6695ef4..6b55fdb 100644 --- a/chrome/renderer/extensions/cast_streaming_native_handler.cc +++ b/chrome/renderer/extensions/cast_streaming_native_handler.cc @@ -124,7 +124,7 @@ bool ToCastRtpPayloadParamsOrThrow(v8::Isolate* isolate, } for (size_t i = 0; i < ext_params.codec_specific_params.size(); ++i) { CastCodecSpecificParams cast_codec_params; - ToCastCodecSpecificParams(*ext_params.codec_specific_params[i], + ToCastCodecSpecificParams(ext_params.codec_specific_params[i], &cast_codec_params); cast_params->codec_specific_params.push_back(cast_codec_params); } @@ -151,11 +151,10 @@ void FromCastRtpPayloadParams(const CastRtpPayloadParams& cast_params, if (cast_params.max_frame_rate > 0.0) ext_params->max_frame_rate.reset(new double(cast_params.max_frame_rate)); for (size_t i = 0; i < cast_params.codec_specific_params.size(); ++i) { - linked_ptr ext_codec_params( - new CodecSpecificParams()); + CodecSpecificParams ext_codec_params; FromCastCodecSpecificParams(cast_params.codec_specific_params[i], - ext_codec_params.get()); - ext_params->codec_specific_params.push_back(ext_codec_params); + &ext_codec_params); + ext_params->codec_specific_params.push_back(std::move(ext_codec_params)); } } -- cgit v1.1