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

Unified Diff: webrtc/api/jsepicecandidate.h

Issue 2680273002: Adding more comments to every header file in api/ subdirectory. (Closed)
Patch Set: Merge with master 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/jsep.h ('k') | webrtc/api/jsepsessiondescription.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/jsepicecandidate.h
diff --git a/webrtc/api/jsepicecandidate.h b/webrtc/api/jsepicecandidate.h
index af064315e0f99c486e5a590f904c576c424418d1..f06863765c911b81d3c0b76708750a598706e59d 100644
--- a/webrtc/api/jsepicecandidate.h
+++ b/webrtc/api/jsepicecandidate.h
@@ -8,7 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-// Implements the IceCandidateInterface.
+// TODO(deadbeef): Move this out of api/; it's an implementation detail and
+// shouldn't be used externally.
#ifndef WEBRTC_API_JSEPICECANDIDATE_H_
#define WEBRTC_API_JSEPICECANDIDATE_H_
@@ -23,13 +24,14 @@
namespace webrtc {
+// Implementation of IceCandidateInterface.
class JsepIceCandidate : public IceCandidateInterface {
public:
JsepIceCandidate(const std::string& sdp_mid, int sdp_mline_index);
JsepIceCandidate(const std::string& sdp_mid, int sdp_mline_index,
const cricket::Candidate& candidate);
~JsepIceCandidate();
- // |error| can be NULL if don't care about the failure reason.
+ // |err| may be NULL.
bool Initialize(const std::string& sdp, SdpParseError* err);
void SetCandidate(const cricket::Candidate& candidate) {
candidate_ = candidate;
@@ -51,8 +53,7 @@ class JsepIceCandidate : public IceCandidateInterface {
RTC_DISALLOW_COPY_AND_ASSIGN(JsepIceCandidate);
};
-// Implementation of IceCandidateCollection.
-// This implementation stores JsepIceCandidates.
+// Implementation of IceCandidateCollection which stores JsepIceCandidates.
class JsepCandidateCollection : public IceCandidateCollection {
public:
JsepCandidateCollection() {}
@@ -66,6 +67,8 @@ class JsepCandidateCollection : public IceCandidateCollection {
}
virtual bool HasCandidate(const IceCandidateInterface* candidate) const;
// Adds and takes ownership of the JsepIceCandidate.
+ // TODO(deadbeef): Make this use an std::unique_ptr<>, so ownership logic is
+ // more clear.
virtual void add(JsepIceCandidate* candidate) {
candidates_.push_back(candidate);
}
@@ -73,6 +76,7 @@ class JsepCandidateCollection : public IceCandidateCollection {
return candidates_[index];
}
// Removes the candidate that has a matching address and protocol.
+ //
// Returns the number of candidates that were removed.
size_t remove(const cricket::Candidate& candidate);
« no previous file with comments | « webrtc/api/jsep.h ('k') | webrtc/api/jsepsessiondescription.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698