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:
parent
59e1464fcd
commit
340e0c5f7a
@ -129,12 +129,6 @@ PeerConnectionInterface::GetConfiguration() {
|
|||||||
return PeerConnectionInterface::RTCConfiguration();
|
return PeerConnectionInterface::RTCConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PeerConnectionInterface::SetConfiguration(
|
|
||||||
const PeerConnectionInterface::RTCConfiguration& config,
|
|
||||||
RTCError* error) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
RTCError PeerConnectionInterface::SetConfiguration(
|
RTCError PeerConnectionInterface::SetConfiguration(
|
||||||
const PeerConnectionInterface::RTCConfiguration& config) {
|
const PeerConnectionInterface::RTCConfiguration& config) {
|
||||||
return RTCError();
|
return RTCError();
|
||||||
|
|||||||
@ -1008,12 +1008,6 @@ class RTC_EXPORT PeerConnectionInterface : public rtc::RefCountInterface {
|
|||||||
// - INVALID_PARAMETER if a TURN server is missing |username| or |password|.
|
// - INVALID_PARAMETER if a TURN server is missing |username| or |password|.
|
||||||
// - INTERNAL_ERROR if an unexpected error occurred.
|
// - 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
|
// TODO(nisse): Make this pure virtual once all Chrome subclasses of
|
||||||
// PeerConnectionInterface implement it.
|
// PeerConnectionInterface implement it.
|
||||||
virtual RTCError SetConfiguration(
|
virtual RTCError SetConfiguration(
|
||||||
|
|||||||
@ -108,10 +108,6 @@ PROXY_METHOD2(void,
|
|||||||
std::unique_ptr<SessionDescriptionInterface>,
|
std::unique_ptr<SessionDescriptionInterface>,
|
||||||
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface>)
|
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface>)
|
||||||
PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration)
|
PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration)
|
||||||
PROXY_METHOD2(bool,
|
|
||||||
SetConfiguration,
|
|
||||||
const PeerConnectionInterface::RTCConfiguration&,
|
|
||||||
RTCError*)
|
|
||||||
PROXY_METHOD1(RTCError,
|
PROXY_METHOD1(RTCError,
|
||||||
SetConfiguration,
|
SetConfiguration,
|
||||||
const PeerConnectionInterface::RTCConfiguration&)
|
const PeerConnectionInterface::RTCConfiguration&)
|
||||||
|
|||||||
@ -107,9 +107,6 @@ class MockPeerConnectionInterface
|
|||||||
void(std::unique_ptr<SessionDescriptionInterface>,
|
void(std::unique_ptr<SessionDescriptionInterface>,
|
||||||
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface>));
|
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface>));
|
||||||
MOCK_METHOD0(GetConfiguration, PeerConnectionInterface::RTCConfiguration());
|
MOCK_METHOD0(GetConfiguration, PeerConnectionInterface::RTCConfiguration());
|
||||||
MOCK_METHOD2(SetConfiguration,
|
|
||||||
bool(const PeerConnectionInterface::RTCConfiguration&,
|
|
||||||
RTCError*));
|
|
||||||
MOCK_METHOD1(SetConfiguration,
|
MOCK_METHOD1(SetConfiguration,
|
||||||
RTCError(const PeerConnectionInterface::RTCConfiguration&));
|
RTCError(const PeerConnectionInterface::RTCConfiguration&));
|
||||||
MOCK_METHOD1(AddIceCandidate, bool(const IceCandidateInterface*));
|
MOCK_METHOD1(AddIceCandidate, bool(const IceCandidateInterface*));
|
||||||
|
|||||||
@ -3490,16 +3490,6 @@ PeerConnectionInterface::RTCConfiguration PeerConnection::GetConfiguration() {
|
|||||||
return configuration_;
|
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(
|
RTCError PeerConnection::SetConfiguration(
|
||||||
const RTCConfiguration& configuration) {
|
const RTCConfiguration& configuration) {
|
||||||
RTC_DCHECK_RUN_ON(signaling_thread());
|
RTC_DCHECK_RUN_ON(signaling_thread());
|
||||||
|
|||||||
@ -209,9 +209,6 @@ class PeerConnection : public PeerConnectionInternal,
|
|||||||
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface> observer)
|
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface> observer)
|
||||||
override;
|
override;
|
||||||
PeerConnectionInterface::RTCConfiguration GetConfiguration() override;
|
PeerConnectionInterface::RTCConfiguration GetConfiguration() override;
|
||||||
bool SetConfiguration(
|
|
||||||
const PeerConnectionInterface::RTCConfiguration& configuration,
|
|
||||||
RTCError* error) override;
|
|
||||||
RTCError SetConfiguration(
|
RTCError SetConfiguration(
|
||||||
const PeerConnectionInterface::RTCConfiguration& configuration) override;
|
const PeerConnectionInterface::RTCConfiguration& configuration) override;
|
||||||
bool AddIceCandidate(const IceCandidateInterface* candidate) override;
|
bool AddIceCandidate(const IceCandidateInterface* candidate) override;
|
||||||
|
|||||||
@ -759,8 +759,7 @@ TEST_P(PeerConnectionEndToEndTest, CanRestartIce) {
|
|||||||
auto config = caller_->pc()->GetConfiguration();
|
auto config = caller_->pc()->GetConfiguration();
|
||||||
ASSERT_NE(PeerConnectionInterface::kRelay, config.type);
|
ASSERT_NE(PeerConnectionInterface::kRelay, config.type);
|
||||||
config.type = PeerConnectionInterface::kRelay;
|
config.type = PeerConnectionInterface::kRelay;
|
||||||
webrtc::RTCError error;
|
ASSERT_TRUE(caller_->pc()->SetConfiguration(config).ok());
|
||||||
ASSERT_TRUE(caller_->pc()->SetConfiguration(config, &error));
|
|
||||||
// When solving https://crbug.com/webrtc/10504, all we need to check
|
// 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.
|
// is that we do not crash. We should also be testing that restart happens.
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2639,8 +2639,8 @@ TEST_P(PeerConnectionInterfaceTest,
|
|||||||
bad_server.username = "foo";
|
bad_server.username = "foo";
|
||||||
config.servers.push_back(bad_server);
|
config.servers.push_back(bad_server);
|
||||||
RTCError error;
|
RTCError error;
|
||||||
EXPECT_FALSE(pc_->SetConfiguration(config, &error));
|
EXPECT_EQ(pc_->SetConfiguration(config).type(),
|
||||||
EXPECT_EQ(RTCErrorType::INVALID_PARAMETER, error.type());
|
RTCErrorType::INVALID_PARAMETER);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test that PeerConnection::Close changes the states to closed and all remote
|
// Test that PeerConnection::Close changes the states to closed and all remote
|
||||||
|
|||||||
@ -165,11 +165,6 @@ class FakePeerConnectionBase : public PeerConnectionInternal {
|
|||||||
|
|
||||||
RTCConfiguration GetConfiguration() override { return RTCConfiguration(); }
|
RTCConfiguration GetConfiguration() override { return RTCConfiguration(); }
|
||||||
|
|
||||||
bool SetConfiguration(const PeerConnectionInterface::RTCConfiguration& config,
|
|
||||||
RTCError* error) override {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
RTCError SetConfiguration(
|
RTCError SetConfiguration(
|
||||||
const PeerConnectionInterface::RTCConfiguration& config) override {
|
const PeerConnectionInterface::RTCConfiguration& config) override {
|
||||||
return RTCError();
|
return RTCError();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user