Delete old version of PeerConnection::SetConfiguration

Followup to https://webrtc-review.googlesource.com/c/src/+/149166

Bug: None
Change-Id: I7b33ee241e3259b8d43f924a38a1e79ec2cd697f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149812
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29057}
This commit is contained in:
Niels Möller 2019-08-26 11:03:47 +02:00 committed by Commit Bot
parent 59e1464fcd
commit 340e0c5f7a
9 changed files with 3 additions and 41 deletions

View File

@ -129,12 +129,6 @@ PeerConnectionInterface::GetConfiguration() {
return PeerConnectionInterface::RTCConfiguration();
}
bool PeerConnectionInterface::SetConfiguration(
const PeerConnectionInterface::RTCConfiguration& config,
RTCError* error) {
return false;
}
RTCError PeerConnectionInterface::SetConfiguration(
const PeerConnectionInterface::RTCConfiguration& config) {
return RTCError();

View File

@ -1008,12 +1008,6 @@ class RTC_EXPORT PeerConnectionInterface : public rtc::RefCountInterface {
// - INVALID_PARAMETER if a TURN server is missing |username| or |password|.
// - INTERNAL_ERROR if an unexpected error occurred.
//
// TODO(nisse): Deprecated, migrate to the method with an RTCError return
// value, then delete this one.
virtual bool SetConfiguration(
const PeerConnectionInterface::RTCConfiguration& config,
RTCError* error);
// TODO(nisse): Make this pure virtual once all Chrome subclasses of
// PeerConnectionInterface implement it.
virtual RTCError SetConfiguration(

View File

@ -108,10 +108,6 @@ PROXY_METHOD2(void,
std::unique_ptr<SessionDescriptionInterface>,
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface>)
PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration)
PROXY_METHOD2(bool,
SetConfiguration,
const PeerConnectionInterface::RTCConfiguration&,
RTCError*)
PROXY_METHOD1(RTCError,
SetConfiguration,
const PeerConnectionInterface::RTCConfiguration&)

View File

@ -107,9 +107,6 @@ class MockPeerConnectionInterface
void(std::unique_ptr<SessionDescriptionInterface>,
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface>));
MOCK_METHOD0(GetConfiguration, PeerConnectionInterface::RTCConfiguration());
MOCK_METHOD2(SetConfiguration,
bool(const PeerConnectionInterface::RTCConfiguration&,
RTCError*));
MOCK_METHOD1(SetConfiguration,
RTCError(const PeerConnectionInterface::RTCConfiguration&));
MOCK_METHOD1(AddIceCandidate, bool(const IceCandidateInterface*));

View File

@ -3490,16 +3490,6 @@ PeerConnectionInterface::RTCConfiguration PeerConnection::GetConfiguration() {
return configuration_;
}
bool PeerConnection::SetConfiguration(const RTCConfiguration& configuration,
RTCError* error) {
RTCError result = SetConfiguration(configuration);
bool success = result.ok();
if (error) {
*error = std::move(result);
}
return success;
}
RTCError PeerConnection::SetConfiguration(
const RTCConfiguration& configuration) {
RTC_DCHECK_RUN_ON(signaling_thread());

View File

@ -209,9 +209,6 @@ class PeerConnection : public PeerConnectionInternal,
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface> observer)
override;
PeerConnectionInterface::RTCConfiguration GetConfiguration() override;
bool SetConfiguration(
const PeerConnectionInterface::RTCConfiguration& configuration,
RTCError* error) override;
RTCError SetConfiguration(
const PeerConnectionInterface::RTCConfiguration& configuration) override;
bool AddIceCandidate(const IceCandidateInterface* candidate) override;

View File

@ -759,8 +759,7 @@ TEST_P(PeerConnectionEndToEndTest, CanRestartIce) {
auto config = caller_->pc()->GetConfiguration();
ASSERT_NE(PeerConnectionInterface::kRelay, config.type);
config.type = PeerConnectionInterface::kRelay;
webrtc::RTCError error;
ASSERT_TRUE(caller_->pc()->SetConfiguration(config, &error));
ASSERT_TRUE(caller_->pc()->SetConfiguration(config).ok());
// When solving https://crbug.com/webrtc/10504, all we need to check
// is that we do not crash. We should also be testing that restart happens.
}

View File

@ -2639,8 +2639,8 @@ TEST_P(PeerConnectionInterfaceTest,
bad_server.username = "foo";
config.servers.push_back(bad_server);
RTCError error;
EXPECT_FALSE(pc_->SetConfiguration(config, &error));
EXPECT_EQ(RTCErrorType::INVALID_PARAMETER, error.type());
EXPECT_EQ(pc_->SetConfiguration(config).type(),
RTCErrorType::INVALID_PARAMETER);
}
// Test that PeerConnection::Close changes the states to closed and all remote

View File

@ -165,11 +165,6 @@ class FakePeerConnectionBase : public PeerConnectionInternal {
RTCConfiguration GetConfiguration() override { return RTCConfiguration(); }
bool SetConfiguration(const PeerConnectionInterface::RTCConfiguration& config,
RTCError* error) override {
return false;
}
RTCError SetConfiguration(
const PeerConnectionInterface::RTCConfiguration& config) override {
return RTCError();