Remove calls to deprecated CreatePC() and CreateDC()
Anything linking to //third_party/jsoncpp is hiding deprecated usage
warnings, so these were not discovered earlier.
Bug: chromium:983223
Change-Id: Id0ade4ca016f19db16377dbeeb756358a7e94fa2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258124
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36463}
diff --git a/pc/test/integration_test_helpers.h b/pc/test/integration_test_helpers.h
index 78c91af..c35c357 100644
--- a/pc/test/integration_test_helpers.h
+++ b/pc/test/integration_test_helpers.h
@@ -410,7 +410,9 @@
void CreateDataChannel(const std::string& label,
const webrtc::DataChannelInit* init) {
- data_channels_.push_back(pc()->CreateDataChannel(label, init));
+ auto data_channel_or_error = pc()->CreateDataChannelOrError(label, init);
+ ASSERT_TRUE(data_channel_or_error.ok());
+ data_channels_.push_back(data_channel_or_error.MoveValue());
ASSERT_TRUE(data_channels_.back().get() != nullptr);
data_observers_.push_back(
std::make_unique<MockDataChannelObserver>(data_channels_.back()));
@@ -825,8 +827,11 @@
modified_config.set_cpu_adaptation(false);
dependencies.observer = this;
- return peer_connection_factory_->CreatePeerConnection(
- modified_config, std::move(dependencies));
+ auto peer_connection_or_error =
+ peer_connection_factory_->CreatePeerConnectionOrError(
+ modified_config, std::move(dependencies));
+ return peer_connection_or_error.ok() ? peer_connection_or_error.MoveValue()
+ : nullptr;
}
void set_signaling_message_receiver(