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

Side by Side Diff: webrtc/p2p/base/transport.cc

Issue 1937693002: Replace scoped_ptr with unique_ptr everywhere (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@unique5
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
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 const rtc::RTCCertificate* certificate, 405 const rtc::RTCCertificate* certificate,
406 const rtc::SSLFingerprint* fingerprint, 406 const rtc::SSLFingerprint* fingerprint,
407 std::string* error_desc) const { 407 std::string* error_desc) const {
408 if (!fingerprint) { 408 if (!fingerprint) {
409 return BadTransportDescription("No fingerprint.", error_desc); 409 return BadTransportDescription("No fingerprint.", error_desc);
410 } 410 }
411 if (!certificate) { 411 if (!certificate) {
412 return BadTransportDescription( 412 return BadTransportDescription(
413 "Fingerprint provided but no identity available.", error_desc); 413 "Fingerprint provided but no identity available.", error_desc);
414 } 414 }
415 rtc::scoped_ptr<rtc::SSLFingerprint> fp_tmp(rtc::SSLFingerprint::Create( 415 std::unique_ptr<rtc::SSLFingerprint> fp_tmp(rtc::SSLFingerprint::Create(
416 fingerprint->algorithm, certificate->identity())); 416 fingerprint->algorithm, certificate->identity()));
417 ASSERT(fp_tmp.get() != NULL); 417 ASSERT(fp_tmp.get() != NULL);
418 if (*fp_tmp == *fingerprint) { 418 if (*fp_tmp == *fingerprint) {
419 return true; 419 return true;
420 } 420 }
421 std::ostringstream desc; 421 std::ostringstream desc;
422 desc << "Local fingerprint does not match identity. Expected: "; 422 desc << "Local fingerprint does not match identity. Expected: ";
423 desc << fp_tmp->ToString(); 423 desc << fp_tmp->ToString();
424 desc << " Got: " << fingerprint->ToString(); 424 desc << " Got: " << fingerprint->ToString();
425 return BadTransportDescription(desc.str(), error_desc); 425 return BadTransportDescription(desc.str(), error_desc);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 } 498 }
499 499
500 // If local is passive, local will act as server. 500 // If local is passive, local will act as server.
501 } 501 }
502 502
503 *ssl_role = is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER; 503 *ssl_role = is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER;
504 return true; 504 return true;
505 } 505 }
506 506
507 } // namespace cricket 507 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/delay_peak_detector.h ('k') | webrtc/p2p/base/transport_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698