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

Unified Diff: webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm

Issue 1965313002: JNI+mm: Generate certificate if non-default key type is specified. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase with master Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
index 3b7632c2b90eb1a73405c5cf64e34d485718d3ff..57c678032a19be0c489a9fad4a00895f9efdbd25 100644
--- a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
+++ b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
@@ -197,14 +197,16 @@ void PeerConnectionDelegateAdapter::OnIceCandidate(
constraints:(RTCMediaConstraints *)constraints
delegate:(id<RTCPeerConnectionDelegate>)delegate {
NSParameterAssert(factory);
+ std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration> config(
+ configuration.nativeConfiguration);
+ if (!config)
+ return nullptr;
tkchin_webrtc 2016/05/13 17:48:06 ObjC style requires braces nil not nullptr. if (
hbos 2016/05/16 12:49:05 Done.
if (self = [super init]) {
_observer.reset(new webrtc::PeerConnectionDelegateAdapter(self));
- webrtc::PeerConnectionInterface::RTCConfiguration config =
- configuration.nativeConfiguration;
std::unique_ptr<webrtc::MediaConstraints> nativeConstraints =
constraints.nativeConstraints;
_peerConnection =
- factory.nativeFactory->CreatePeerConnection(config,
+ factory.nativeFactory->CreatePeerConnection(*config,
nativeConstraints.get(),
nullptr,
nullptr,
@@ -251,7 +253,11 @@ void PeerConnectionDelegateAdapter::OnIceCandidate(
}
- (BOOL)setConfiguration:(RTCConfiguration *)configuration {
- return _peerConnection->SetConfiguration(configuration.nativeConfiguration);
+ std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration> config(
+ configuration.nativeConfiguration);
+ if (!config)
+ return false;
tkchin_webrtc 2016/05/13 17:48:06 BOOL is not a boolean if (!nativeConfiguration) {
hbos 2016/05/16 12:49:05 Done.
+ return _peerConnection->SetConfiguration(*config);
}
- (void)close {

Powered by Google App Engine
This is Rietveld 408576698