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

Side by Side Diff: webrtc/api/webrtcsessiondescriptionfactory.cc

Issue 1930463002: Replace scoped_ptr with unique_ptr in webrtc/api/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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/api/webrtcsessiondescriptionfactory.h ('k') | no next file » | 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 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2013 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
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 }; 57 };
58 58
59 struct CreateSessionDescriptionMsg : public rtc::MessageData { 59 struct CreateSessionDescriptionMsg : public rtc::MessageData {
60 explicit CreateSessionDescriptionMsg( 60 explicit CreateSessionDescriptionMsg(
61 webrtc::CreateSessionDescriptionObserver* observer) 61 webrtc::CreateSessionDescriptionObserver* observer)
62 : observer(observer) { 62 : observer(observer) {
63 } 63 }
64 64
65 rtc::scoped_refptr<webrtc::CreateSessionDescriptionObserver> observer; 65 rtc::scoped_refptr<webrtc::CreateSessionDescriptionObserver> observer;
66 std::string error; 66 std::string error;
67 rtc::scoped_ptr<webrtc::SessionDescriptionInterface> description; 67 std::unique_ptr<webrtc::SessionDescriptionInterface> description;
68 }; 68 };
69 } // namespace 69 } // namespace
70 70
71 void WebRtcIdentityRequestObserver::OnFailure(int error) { 71 void WebRtcIdentityRequestObserver::OnFailure(int error) {
72 SignalRequestFailed(error); 72 SignalRequestFailed(error);
73 } 73 }
74 74
75 void WebRtcIdentityRequestObserver::OnSuccess( 75 void WebRtcIdentityRequestObserver::OnSuccess(
76 const std::string& der_cert, const std::string& der_private_key) { 76 const std::string& der_cert, const std::string& der_private_key) {
77 std::string pem_cert = rtc::SSLIdentity::DerToPem( 77 std::string pem_cert = rtc::SSLIdentity::DerToPem(
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 if (!dest_candidates->HasCandidate(new_candidate)) { 120 if (!dest_candidates->HasCandidate(new_candidate)) {
121 dest_desc->AddCandidate(source_candidates->at(n)); 121 dest_desc->AddCandidate(source_candidates->at(n));
122 } 122 }
123 } 123 }
124 } 124 }
125 125
126 // Private constructor called by other constructors. 126 // Private constructor called by other constructors.
127 WebRtcSessionDescriptionFactory::WebRtcSessionDescriptionFactory( 127 WebRtcSessionDescriptionFactory::WebRtcSessionDescriptionFactory(
128 rtc::Thread* signaling_thread, 128 rtc::Thread* signaling_thread,
129 cricket::ChannelManager* channel_manager, 129 cricket::ChannelManager* channel_manager,
130 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, 130 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
131 const rtc::scoped_refptr<WebRtcIdentityRequestObserver>& 131 const rtc::scoped_refptr<WebRtcIdentityRequestObserver>&
132 identity_request_observer, 132 identity_request_observer,
133 WebRtcSession* session, 133 WebRtcSession* session,
134 const std::string& session_id, 134 const std::string& session_id,
135 bool dtls_enabled) 135 bool dtls_enabled)
136 : signaling_thread_(signaling_thread), 136 : signaling_thread_(signaling_thread),
137 session_desc_factory_(channel_manager, &transport_desc_factory_), 137 session_desc_factory_(channel_manager, &transport_desc_factory_),
138 // RFC 4566 suggested a Network Time Protocol (NTP) format timestamp 138 // RFC 4566 suggested a Network Time Protocol (NTP) format timestamp
139 // as the session id and session version. To simplify, it should be fine 139 // as the session id and session version. To simplify, it should be fine
140 // to just use a random number as session id and start version from 140 // to just use a random number as session id and start version from
(...skipping 20 matching lines...) Expand all
161 nullptr, 161 nullptr,
162 session, 162 session,
163 session_id, 163 session_id,
164 false) { 164 false) {
165 LOG(LS_VERBOSE) << "DTLS-SRTP disabled."; 165 LOG(LS_VERBOSE) << "DTLS-SRTP disabled.";
166 } 166 }
167 167
168 WebRtcSessionDescriptionFactory::WebRtcSessionDescriptionFactory( 168 WebRtcSessionDescriptionFactory::WebRtcSessionDescriptionFactory(
169 rtc::Thread* signaling_thread, 169 rtc::Thread* signaling_thread,
170 cricket::ChannelManager* channel_manager, 170 cricket::ChannelManager* channel_manager,
171 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, 171 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
172 WebRtcSession* session, 172 WebRtcSession* session,
173 const std::string& session_id) 173 const std::string& session_id)
174 : WebRtcSessionDescriptionFactory( 174 : WebRtcSessionDescriptionFactory(
175 signaling_thread, 175 signaling_thread,
176 channel_manager, 176 channel_manager,
177 std::move(dtls_identity_store), 177 std::move(dtls_identity_store),
178 new rtc::RefCountedObject<WebRtcIdentityRequestObserver>(), 178 new rtc::RefCountedObject<WebRtcIdentityRequestObserver>(),
179 session, 179 session,
180 session_id, 180 session_id,
181 true) { 181 true) {
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 if (create_session_description_requests_.front().type == 512 if (create_session_description_requests_.front().type ==
513 CreateSessionDescriptionRequest::kOffer) { 513 CreateSessionDescriptionRequest::kOffer) {
514 InternalCreateOffer(create_session_description_requests_.front()); 514 InternalCreateOffer(create_session_description_requests_.front());
515 } else { 515 } else {
516 InternalCreateAnswer(create_session_description_requests_.front()); 516 InternalCreateAnswer(create_session_description_requests_.front());
517 } 517 }
518 create_session_description_requests_.pop(); 518 create_session_description_requests_.pop();
519 } 519 }
520 } 520 }
521 } // namespace webrtc 521 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/webrtcsessiondescriptionfactory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698