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

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: Fixed indent. 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
« no previous file with comments | « content/renderer/media/webrtc/peer_connection_dependency_factory.cc ('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 // 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,
393 nullptr));
393 if (!candidate.get()) { 394 if (!candidate.get()) {
394 LOG(ERROR) 395 LOG(ERROR)
395 << "Invalid Cast Extension Message (could not create candidate)."; 396 << "Invalid Cast Extension Message (could not create candidate).";
396 return false; 397 return false;
397 } 398 }
398 399
399 if (!peer_connection_->AddIceCandidate(candidate.get())) { 400 if (!peer_connection_->AddIceCandidate(candidate.get())) {
400 LOG(ERROR) << "Failed to apply received ICE Candidate to PeerConnection."; 401 LOG(ERROR) << "Failed to apply received ICE Candidate to PeerConnection.";
401 return false; 402 return false;
402 } 403 }
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 json.SetString(kWebRtcCandidate, candidate_str); 654 json.SetString(kWebRtcCandidate, candidate_str);
654 std::string json_str; 655 std::string json_str;
655 if (!base::JSONWriter::Write(json, &json_str)) { 656 if (!base::JSONWriter::Write(json, &json_str)) {
656 LOG(ERROR) << "Failed to serialize candidate message."; 657 LOG(ERROR) << "Failed to serialize candidate message.";
657 return; 658 return;
658 } 659 }
659 SendMessageToClient(kSubjectNewCandidate, json_str); 660 SendMessageToClient(kSubjectNewCandidate, json_str);
660 } 661 }
661 662
662 } // namespace remoting 663 } // namespace remoting
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc/peer_connection_dependency_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698