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

Side by Side Diff: remoting/protocol/webrtc_transport.cc

Issue 2105123002: various: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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 | « no previous file | services/catalog/reader.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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/protocol/webrtc_transport.h" 5 #include "remoting/protocol/webrtc_transport.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 DCHECK(pending_transport_info_message_); 549 DCHECK(pending_transport_info_message_);
550 550
551 send_transport_info_callback_.Run(std::move(pending_transport_info_message_)); 551 send_transport_info_callback_.Run(std::move(pending_transport_info_message_));
552 } 552 }
553 553
554 void WebrtcTransport::AddPendingCandidatesIfPossible() { 554 void WebrtcTransport::AddPendingCandidatesIfPossible() {
555 DCHECK(thread_checker_.CalledOnValidThread()); 555 DCHECK(thread_checker_.CalledOnValidThread());
556 556
557 if (peer_connection_->signaling_state() == 557 if (peer_connection_->signaling_state() ==
558 webrtc::PeerConnectionInterface::kStable) { 558 webrtc::PeerConnectionInterface::kStable) {
559 for (auto candidate : pending_incoming_candidates_) { 559 for (auto* candidate : pending_incoming_candidates_) {
560 if (!peer_connection_->AddIceCandidate(candidate)) { 560 if (!peer_connection_->AddIceCandidate(candidate)) {
561 LOG(ERROR) << "Failed to add incoming candidate"; 561 LOG(ERROR) << "Failed to add incoming candidate";
562 Close(INCOMPATIBLE_PROTOCOL); 562 Close(INCOMPATIBLE_PROTOCOL);
563 return; 563 return;
564 } 564 }
565 } 565 }
566 pending_incoming_candidates_.clear(); 566 pending_incoming_candidates_.clear();
567 } 567 }
568 } 568 }
569 569
570 void WebrtcTransport::Close(ErrorCode error) { 570 void WebrtcTransport::Close(ErrorCode error) {
571 DCHECK(thread_checker_.CalledOnValidThread()); 571 DCHECK(thread_checker_.CalledOnValidThread());
572 if (!peer_connection_) 572 if (!peer_connection_)
573 return; 573 return;
574 574
575 weak_factory_.InvalidateWeakPtrs(); 575 weak_factory_.InvalidateWeakPtrs();
576 peer_connection_->Close(); 576 peer_connection_->Close();
577 peer_connection_ = nullptr; 577 peer_connection_ = nullptr;
578 peer_connection_factory_ = nullptr; 578 peer_connection_factory_ = nullptr;
579 579
580 if (error != OK) 580 if (error != OK)
581 event_handler_->OnWebrtcTransportError(error); 581 event_handler_->OnWebrtcTransportError(error);
582 } 582 }
583 583
584 } // namespace protocol 584 } // namespace protocol
585 } // namespace remoting 585 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | services/catalog/reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698