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

Side by Side Diff: remoting/host/cast_extension_session.cc

Issue 1211323013: Stop calling deprecated version of "CreateIceCandidate". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/host/cast_extension_session.h" 5 #include "remoting/host/cast_extension_session.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 std::string sdp_mid; 382 std::string sdp_mid;
383 int sdp_mlineindex = 0; 383 int sdp_mlineindex = 0;
384 if (!message_data->GetString(kWebRtcSDPMid, &sdp_mid) || 384 if (!message_data->GetString(kWebRtcSDPMid, &sdp_mid) ||
385 !message_data->GetInteger(kWebRtcSDPMLineIndex, &sdp_mlineindex) || 385 !message_data->GetInteger(kWebRtcSDPMLineIndex, &sdp_mlineindex) ||
386 !message_data->GetString(kWebRtcCandidate, &candidate_str)) { 386 !message_data->GetString(kWebRtcCandidate, &candidate_str)) {
387 LOG(ERROR) << "Invalid Cast Extension Message (could not parse)."; 387 LOG(ERROR) << "Invalid Cast Extension Message (could not parse).";
388 return false; 388 return false;
389 } 389 }
390 390
391 rtc::scoped_ptr<webrtc::IceCandidateInterface> candidate( 391 rtc::scoped_ptr<webrtc::IceCandidateInterface> candidate(
392 webrtc::CreateIceCandidate(sdp_mid, sdp_mlineindex, candidate_str)); 392 webrtc::CreateIceCandidate(sdp_mid, sdp_mlineindex, candidate_str, NULL));
tommi (sloooow) - chröme 2015/07/02 11:24:31 same here
joachim 2015/07/02 12:01:23 Done.
393 if (!candidate.get()) { 393 if (!candidate.get()) {
394 LOG(ERROR) 394 LOG(ERROR)
395 << "Invalid Cast Extension Message (could not create candidate)."; 395 << "Invalid Cast Extension Message (could not create candidate).";
396 return false; 396 return false;
397 } 397 }
398 398
399 if (!peer_connection_->AddIceCandidate(candidate.get())) { 399 if (!peer_connection_->AddIceCandidate(candidate.get())) {
400 LOG(ERROR) << "Failed to apply received ICE Candidate to PeerConnection."; 400 LOG(ERROR) << "Failed to apply received ICE Candidate to PeerConnection.";
401 return false; 401 return false;
402 } 402 }
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 json.SetString(kWebRtcCandidate, candidate_str); 653 json.SetString(kWebRtcCandidate, candidate_str);
654 std::string json_str; 654 std::string json_str;
655 if (!base::JSONWriter::Write(json, &json_str)) { 655 if (!base::JSONWriter::Write(json, &json_str)) {
656 LOG(ERROR) << "Failed to serialize candidate message."; 656 LOG(ERROR) << "Failed to serialize candidate message.";
657 return; 657 return;
658 } 658 }
659 SendMessageToClient(kSubjectNewCandidate, json_str); 659 SendMessageToClient(kSubjectNewCandidate, json_str);
660 } 660 }
661 661
662 } // namespace remoting 662 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698