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

Side by Side Diff: webrtc/p2p/base/jseptransport.h

Issue 2563153002: Implement the "needs-ice-restart" logic for SetConfiguration. (Closed)
Patch Set: Fixing find/replace mistake. Created 4 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 bool SetLocalTransportDescription(const TransportDescription& description, 281 bool SetLocalTransportDescription(const TransportDescription& description,
282 ContentAction action, 282 ContentAction action,
283 std::string* error_desc); 283 std::string* error_desc);
284 284
285 // Set the remote TransportDescription to be used by DTLS and ICE channels 285 // Set the remote TransportDescription to be used by DTLS and ICE channels
286 // that are part of this Transport. 286 // that are part of this Transport.
287 bool SetRemoteTransportDescription(const TransportDescription& description, 287 bool SetRemoteTransportDescription(const TransportDescription& description,
288 ContentAction action, 288 ContentAction action,
289 std::string* error_desc); 289 std::string* error_desc);
290 290
291 // Set the "needs-ice-restart" flag as described in JSEP.
292 // This and the below method can be called safely from any thread as long as
293 // SetXTransportDescription is not in progress.
pthatcher1 2016/12/10 02:26:31 And if SetXTransportDescription is in progress, wh
Taylor Brandstetter 2016/12/10 19:00:35 Undefined behavior. So don't do that.
294 void SetNeedsIceRestartFlag();
295 // Returns true if the ICE restart flag above was set, and no ICE restart has
296 // occurred yet for this transport.
pthatcher1 2016/12/10 02:26:31 "no ICE restart has occured", meaning that an ICE
Taylor Brandstetter 2016/12/10 19:00:35 I clarified the comments. As for rollback, there a
297 bool NeedsIceRestart() const;
298
291 void GetSslRole(rtc::SSLRole* ssl_role) const; 299 void GetSslRole(rtc::SSLRole* ssl_role) const;
292 300
293 // TODO(deadbeef): Make this const. See comment in transportcontroller.h. 301 // TODO(deadbeef): Make this const. See comment in transportcontroller.h.
294 bool GetStats(TransportStats* stats); 302 bool GetStats(TransportStats* stats);
295 303
296 // The current local transport description, possibly used 304 // The current local transport description, possibly used
297 // by the transport controller. 305 // by the transport controller.
298 const TransportDescription* local_description() const { 306 const TransportDescription* local_description() const {
299 return local_description_.get(); 307 return local_description_.get();
300 } 308 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 // Pushes down the transport parameters from the remote description to the 349 // Pushes down the transport parameters from the remote description to the
342 // transport channel. 350 // transport channel.
343 bool ApplyRemoteTransportDescription(TransportChannelImpl* channel, 351 bool ApplyRemoteTransportDescription(TransportChannelImpl* channel,
344 std::string* error_desc); 352 std::string* error_desc);
345 353
346 // Pushes down the transport parameters obtained via negotiation. 354 // Pushes down the transport parameters obtained via negotiation.
347 bool ApplyNegotiatedTransportDescription(TransportChannelImpl* channel, 355 bool ApplyNegotiatedTransportDescription(TransportChannelImpl* channel,
348 std::string* error_desc); 356 std::string* error_desc);
349 357
350 const std::string mid_; 358 const std::string mid_;
359 // needs-ice-restart bit as described in JSEP.
pthatcher1 2016/12/10 02:26:31 A summary of what it means would be nice, even if
Taylor Brandstetter 2016/12/10 19:00:35 Doesn't need to be here, since this is a private v
360 bool needs_ice_restart_ = false;
351 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; 361 rtc::scoped_refptr<rtc::RTCCertificate> certificate_;
352 rtc::SSLRole secure_role_ = rtc::SSL_CLIENT; 362 rtc::SSLRole secure_role_ = rtc::SSL_CLIENT;
353 std::unique_ptr<rtc::SSLFingerprint> remote_fingerprint_; 363 std::unique_ptr<rtc::SSLFingerprint> remote_fingerprint_;
354 std::unique_ptr<TransportDescription> local_description_; 364 std::unique_ptr<TransportDescription> local_description_;
355 std::unique_ptr<TransportDescription> remote_description_; 365 std::unique_ptr<TransportDescription> remote_description_;
356 bool local_description_set_ = false; 366 bool local_description_set_ = false;
357 bool remote_description_set_ = false; 367 bool remote_description_set_ = false;
358 368
359 // Candidate component => DTLS channel 369 // Candidate component => DTLS channel
360 std::map<int, TransportChannelImpl*> channels_; 370 std::map<int, TransportChannelImpl*> channels_;
361 371
362 RTC_DISALLOW_COPY_AND_ASSIGN(JsepTransport); 372 RTC_DISALLOW_COPY_AND_ASSIGN(JsepTransport);
363 }; 373 };
364 374
365 } // namespace cricket 375 } // namespace cricket
366 376
367 #endif // WEBRTC_P2P_BASE_JSEPTRANSPORT_H_ 377 #endif // WEBRTC_P2P_BASE_JSEPTRANSPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698