Commit 73d73ea6 authored by Niels Möller's avatar Niels Möller Committed by Commit Bot

Update for new signature of PeerConnectionInterface::SetConfiguration

Intended to enable landing of
https://webrtc-review.googlesource.com/c/src/+/149812

Bug: None
Change-Id: I4ec2880c9804ae3c238076ea306def10f80a762c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1768433
Auto-Submit: Niels Möller <nisse@chromium.org>
Commit-Queue: Florent Castelli <orphis@chromium.org>
Reviewed-by: default avatarFlorent Castelli <orphis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#690365}
parent 23a91b2d
......@@ -512,14 +512,9 @@ void MockPeerConnectionImpl::SetRemoteDescriptionWorker(
remote_desc_.reset(desc);
}
bool MockPeerConnectionImpl::SetConfiguration(
const RTCConfiguration& configuration,
webrtc::RTCError* error) {
if (setconfiguration_error_type_ == webrtc::RTCErrorType::NONE) {
return true;
}
error->set_type(setconfiguration_error_type_);
return false;
webrtc::RTCError MockPeerConnectionImpl::SetConfiguration(
const RTCConfiguration& configuration) {
return webrtc::RTCError(setconfiguration_error_type_);
}
bool MockPeerConnectionImpl::AddIceCandidate(
......
......@@ -326,8 +326,9 @@ class MockPeerConnectionImpl : public webrtc::PeerConnectionInterface {
NOTIMPLEMENTED();
return webrtc::PeerConnectionInterface::RTCConfiguration();
}
bool SetConfiguration(const RTCConfiguration& configuration,
webrtc::RTCError* error) override;
webrtc::RTCError SetConfiguration(
const RTCConfiguration& configuration) override;
bool AddIceCandidate(const webrtc::IceCandidateInterface* candidate) override;
bool RemoveIceCandidates(
const std::vector<cricket::Candidate>& candidates) override {
......
......@@ -1450,13 +1450,8 @@ webrtc::RTCErrorType RTCPeerConnectionHandler::SetConfiguration(
if (peer_connection_tracker_)
peer_connection_tracker_->TrackSetConfiguration(this, new_configuration);
webrtc::RTCError webrtc_error;
bool ret = native_peer_connection_->SetConfiguration(new_configuration,
&webrtc_error);
// The boolean return value is made redundant by the error output param; just
// DCHECK that they're consistent.
DCHECK_EQ(ret, webrtc_error.type() == webrtc::RTCErrorType::NONE);
webrtc::RTCError webrtc_error =
native_peer_connection_->SetConfiguration(new_configuration);
if (webrtc_error.ok()) {
configuration_ = new_configuration;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment