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

Side by Side Diff: webrtc/media/sctp/sctpdataengine.cc

Issue 1728503002: Replace scoped_ptr with unique_ptr in webrtc/media/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@up1
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « webrtc/media/sctp/sctpdataengine.h ('k') | webrtc/media/sctp/sctpdataengine_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/media/sctp/sctpdataengine.h" 11 #include "webrtc/media/sctp/sctpdataengine.h"
12 12
13 #include <stdarg.h> 13 #include <stdarg.h>
14 #include <stdio.h> 14 #include <stdio.h>
15
16 #include <memory>
15 #include <sstream> 17 #include <sstream>
16 #include <vector> 18 #include <vector>
17 19
18 #include "usrsctplib/usrsctp.h" 20 #include "usrsctplib/usrsctp.h"
19 #include "webrtc/base/arraysize.h" 21 #include "webrtc/base/arraysize.h"
20 #include "webrtc/base/buffer.h" 22 #include "webrtc/base/buffer.h"
21 #include "webrtc/base/helpers.h" 23 #include "webrtc/base/helpers.h"
22 #include "webrtc/base/logging.h" 24 #include "webrtc/base/logging.h"
23 #include "webrtc/base/safe_conversions.h" 25 #include "webrtc/base/safe_conversions.h"
24 #include "webrtc/media/base/codec.h" 26 #include "webrtc/media/base/codec.h"
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 1015
1014 // sent_reset_streams_ is empty, and all the queued_reset_streams_ go into 1016 // sent_reset_streams_ is empty, and all the queued_reset_streams_ go into
1015 // it now. 1017 // it now.
1016 queued_reset_streams_.swap(sent_reset_streams_); 1018 queued_reset_streams_.swap(sent_reset_streams_);
1017 return true; 1019 return true;
1018 } 1020 }
1019 1021
1020 void SctpDataMediaChannel::OnMessage(rtc::Message* msg) { 1022 void SctpDataMediaChannel::OnMessage(rtc::Message* msg) {
1021 switch (msg->message_id) { 1023 switch (msg->message_id) {
1022 case MSG_SCTPINBOUNDPACKET: { 1024 case MSG_SCTPINBOUNDPACKET: {
1023 rtc::scoped_ptr<InboundPacketMessage> pdata( 1025 std::unique_ptr<InboundPacketMessage> pdata(
1024 static_cast<InboundPacketMessage*>(msg->pdata)); 1026 static_cast<InboundPacketMessage*>(msg->pdata));
1025 OnInboundPacketFromSctpToChannel(pdata->data().get()); 1027 OnInboundPacketFromSctpToChannel(pdata->data().get());
1026 break; 1028 break;
1027 } 1029 }
1028 case MSG_SCTPOUTBOUNDPACKET: { 1030 case MSG_SCTPOUTBOUNDPACKET: {
1029 rtc::scoped_ptr<OutboundPacketMessage> pdata( 1031 std::unique_ptr<OutboundPacketMessage> pdata(
1030 static_cast<OutboundPacketMessage*>(msg->pdata)); 1032 static_cast<OutboundPacketMessage*>(msg->pdata));
1031 OnPacketFromSctpToNetwork(pdata->data().get()); 1033 OnPacketFromSctpToNetwork(pdata->data().get());
1032 break; 1034 break;
1033 } 1035 }
1034 } 1036 }
1035 } 1037 }
1036 } // namespace cricket 1038 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/sctp/sctpdataengine.h ('k') | webrtc/media/sctp/sctpdataengine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698