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

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

Issue 2709293004: RTCIceCandidatePairStats.nominated collected. (Closed)
Patch Set: Updated comment Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « webrtc/p2p/base/jseptransport.cc ('k') | webrtc/p2p/base/port.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 // side stops using it as well. 524 // side stops using it as well.
525 bool pruned() const { return pruned_; } 525 bool pruned() const { return pruned_; }
526 void Prune(); 526 void Prune();
527 527
528 bool use_candidate_attr() const { return use_candidate_attr_; } 528 bool use_candidate_attr() const { return use_candidate_attr_; }
529 void set_use_candidate_attr(bool enable); 529 void set_use_candidate_attr(bool enable);
530 530
531 void set_nomination(uint32_t value) { nomination_ = value; } 531 void set_nomination(uint32_t value) { nomination_ = value; }
532 532
533 uint32_t remote_nomination() const { return remote_nomination_; } 533 uint32_t remote_nomination() const { return remote_nomination_; }
534 bool nominated() const { return remote_nomination_ > 0; } 534 // One or several pairs may be nominated based on if Regular or Aggressive
535 // Nomination is used. https://tools.ietf.org/html/rfc5245#section-8
536 // |nominated| is defined both for the controlling or controlled agent based
537 // on if a nomination has been pinged or acknowledged. The controlled agent
538 // gets its |remote_nomination_| set when pinged by the controlling agent with
539 // a nomination value. The controlling agent gets its |acked_nomination_| set
540 // when receiving a response to a nominating ping.
541 bool nominated() const { return acked_nomination_ || remote_nomination_; }
535 // Public for unit tests. 542 // Public for unit tests.
536 void set_remote_nomination(uint32_t remote_nomination) { 543 void set_remote_nomination(uint32_t remote_nomination) {
537 remote_nomination_ = remote_nomination; 544 remote_nomination_ = remote_nomination;
538 } 545 }
539 // Public for unit tests. 546 // Public for unit tests.
540 uint32_t acked_nomination() const { return acked_nomination_; } 547 uint32_t acked_nomination() const { return acked_nomination_; }
541 548
542 void set_remote_ice_mode(IceMode mode) { 549 void set_remote_ice_mode(IceMode mode) {
543 remote_ice_mode_ = mode; 550 remote_ice_mode_ = mode;
544 } 551 }
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 const rtc::PacketOptions& options) override; 735 const rtc::PacketOptions& options) override;
729 int GetError() override { return error_; } 736 int GetError() override { return error_; }
730 737
731 private: 738 private:
732 int error_ = 0; 739 int error_ = 0;
733 }; 740 };
734 741
735 } // namespace cricket 742 } // namespace cricket
736 743
737 #endif // WEBRTC_P2P_BASE_PORT_H_ 744 #endif // WEBRTC_P2P_BASE_PORT_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/jseptransport.cc ('k') | webrtc/p2p/base/port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698