Reland of Adding PeerConnectionInterface::SetConfiguration method. (patchset #1 id:1 of https://codereview.webrtc.org/1361263002/ )
Reason for revert:
Relanding with SetConfiguration not pure virtual.
Original issue's description:
> Revert of Adding PeerConnectionInterface::SetConfiguration method. (patchset #4 id:60001 of https://codereview.webrtc.org/1317353005/ )
>
> Reason for revert:
> Broke FYI bots because SetConfiguration is pure virtual and MockPeerConnectionImpl doesn't implement it. Need to reland with SetConfiguration not pure virtual.
>
> Original issue's description:
> > Adding PeerConnectionInterface::SetConfiguration method.
> >
> > Also updated the JNI and Objective-C bindings. Later, will have a CL to
> > remove UpdateIce, which this method effectively replaces.
> >
> > BUG=webrtc:4945
> >
> > Committed: https://crrev.com/70702afbcb8418fe93747e7ed63bcbf5e56b90e9
> > Cr-Commit-Position: refs/heads/master@{#10040}
>
> TBR=guoweis@webrtc.org,pthatcher@webrtc.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4945
>
> Committed: https://crrev.com/7603c76ab077b1e2033bb179595129bd96797345
> Cr-Commit-Position: refs/heads/master@{#10041}
TBR=guoweis@webrtc.org,pthatcher@webrtc.org,tkchin@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4945
Review URL: https://codereview.webrtc.org/1361273002
Cr-Commit-Position: refs/heads/master@{#10112}
diff --git a/talk/app/webrtc/peerconnectioninterface.h b/talk/app/webrtc/peerconnectioninterface.h
index 734c2d0..f301baf 100644
--- a/talk/app/webrtc/peerconnectioninterface.h
+++ b/talk/app/webrtc/peerconnectioninterface.h
@@ -379,8 +379,22 @@
SessionDescriptionInterface* desc) = 0;
// Restarts or updates the ICE Agent process of gathering local candidates
// and pinging remote candidates.
+ // TODO(deadbeef): Remove once Chrome is moved over to SetConfiguration.
virtual bool UpdateIce(const IceServers& configuration,
- const MediaConstraintsInterface* constraints) = 0;
+ const MediaConstraintsInterface* constraints) {
+ return false;
+ }
+ // Sets the PeerConnection's global configuration to |config|.
+ // Any changes to STUN/TURN servers or ICE candidate policy will affect the
+ // next gathering phase, and cause the next call to createOffer to generate
+ // new ICE credentials. Note that the BUNDLE and RTCP-multiplexing policies
+ // cannot be changed with this method.
+ // TODO(deadbeef): Make this pure virtual once all Chrome subclasses of
+ // PeerConnectionInterface implement it.
+ virtual bool SetConfiguration(
+ const PeerConnectionInterface::RTCConfiguration& config) {
+ return false;
+ }
// Provides a remote candidate to the ICE Agent.
// A copy of the |candidate| will be created and added to the remote
// description. So the caller of this method still has the ownership of the