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

Side by Side Diff: webrtc/p2p/quic/quictransportchannel.cc

Issue 1923163003: Replace scoped_ptr with unique_ptr in webrtc/p2p/ (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
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2016 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 // ProofVerifier override. 104 // ProofVerifier override.
105 net::QuicAsyncStatus VerifyProof( 105 net::QuicAsyncStatus VerifyProof(
106 const std::string& hostname, 106 const std::string& hostname,
107 const std::string& server_config, 107 const std::string& server_config,
108 const std::vector<std::string>& certs, 108 const std::vector<std::string>& certs,
109 const std::string& cert_sct, 109 const std::string& cert_sct,
110 const std::string& signature, 110 const std::string& signature,
111 const net::ProofVerifyContext* verify_context, 111 const net::ProofVerifyContext* verify_context,
112 std::string* error_details, 112 std::string* error_details,
113 scoped_ptr<net::ProofVerifyDetails>* verify_details, 113 std::unique_ptr<net::ProofVerifyDetails>* verify_details,
114 net::ProofVerifierCallback* callback) override { 114 net::ProofVerifierCallback* callback) override {
115 LOG(LS_INFO) << "VerifyProof() ignoring credentials and returning success"; 115 LOG(LS_INFO) << "VerifyProof() ignoring credentials and returning success";
116 return net::QUIC_SUCCESS; 116 return net::QUIC_SUCCESS;
117 } 117 }
118 }; 118 };
119 119
120 } // namespace 120 } // namespace
121 121
122 namespace cricket { 122 namespace cricket {
123 123
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } 428 }
429 429
430 bool QuicTransportChannel::CreateQuicSession() { 430 bool QuicTransportChannel::CreateQuicSession() {
431 if (!ssl_role_ || !remote_fingerprint_) { 431 if (!ssl_role_ || !remote_fingerprint_) {
432 return false; 432 return false;
433 } 433 }
434 net::Perspective perspective = (*ssl_role_ == rtc::SSL_CLIENT) 434 net::Perspective perspective = (*ssl_role_ == rtc::SSL_CLIENT)
435 ? net::Perspective::IS_CLIENT 435 ? net::Perspective::IS_CLIENT
436 : net::Perspective::IS_SERVER; 436 : net::Perspective::IS_SERVER;
437 bool owns_writer = false; 437 bool owns_writer = false;
438 rtc::scoped_ptr<net::QuicConnection> connection(new net::QuicConnection( 438 std::unique_ptr<net::QuicConnection> connection(new net::QuicConnection(
439 kConnectionId, kConnectionIpEndpoint, &helper_, this, owns_writer, 439 kConnectionId, kConnectionIpEndpoint, &helper_, this, owns_writer,
440 perspective, net::QuicSupportedVersions())); 440 perspective, net::QuicSupportedVersions()));
441 quic_.reset(new QuicSession(std::move(connection), config_)); 441 quic_.reset(new QuicSession(std::move(connection), config_));
442 quic_->SignalHandshakeComplete.connect( 442 quic_->SignalHandshakeComplete.connect(
443 this, &QuicTransportChannel::OnHandshakeComplete); 443 this, &QuicTransportChannel::OnHandshakeComplete);
444 quic_->SignalConnectionClosed.connect( 444 quic_->SignalConnectionClosed.connect(
445 this, &QuicTransportChannel::OnConnectionClosed); 445 this, &QuicTransportChannel::OnConnectionClosed);
446 quic_->SignalIncomingStream.connect(this, 446 quic_->SignalIncomingStream.connect(this,
447 &QuicTransportChannel::OnIncomingStream); 447 &QuicTransportChannel::OnIncomingStream);
448 return true; 448 return true;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 return quic_->CreateOutgoingDynamicStream(priority); 578 return quic_->CreateOutgoingDynamicStream(priority);
579 } 579 }
580 return nullptr; 580 return nullptr;
581 } 581 }
582 582
583 void QuicTransportChannel::OnIncomingStream(ReliableQuicStream* stream) { 583 void QuicTransportChannel::OnIncomingStream(ReliableQuicStream* stream) {
584 SignalIncomingStream(stream); 584 SignalIncomingStream(stream);
585 } 585 }
586 586
587 } // namespace cricket 587 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/quic/quictransportchannel.h ('k') | webrtc/p2p/quic/quictransportchannel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698