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

Unified Diff: webrtc/pc/webrtcsession.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. 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
Index: webrtc/pc/webrtcsession.cc
diff --git a/webrtc/pc/webrtcsession.cc b/webrtc/pc/webrtcsession.cc
index e59466c67ba1bdd574d5011b20db0d3676fd8996..d933221d882a53c9e294cfcaedcc833c742a0f7e 100644
--- a/webrtc/pc/webrtcsession.cc
+++ b/webrtc/pc/webrtcsession.cc
@@ -234,7 +234,7 @@ static bool VerifyIceUfragPwdPresent(const SessionDescription* desc) {
static bool GetTrackIdBySsrc(const SessionDescription* session_description,
uint32_t ssrc,
std::string* track_id) {
- RTC_DCHECK(track_id != NULL);
+ RTC_DCHECK(track_id != nullptr);
const cricket::ContentInfo* audio_info =
cricket::GetFirstAudioContent(session_description);
@@ -455,13 +455,13 @@ WebRtcSession::WebRtcSession(
sctp_factory_(std::move(sctp_factory)),
media_controller_(media_controller),
channel_manager_(media_controller_->channel_manager()),
- ice_observer_(NULL),
+ ice_observer_(nullptr),
ice_connection_state_(PeerConnectionInterface::kIceConnectionNew),
ice_connection_receiving_(true),
older_version_remote_peer_(false),
dtls_enabled_(false),
data_channel_type_(cricket::DCT_NONE),
- metrics_observer_(NULL) {
+ metrics_observer_(nullptr) {
transport_controller_->SetIceRole(cricket::ICEROLE_CONTROLLED);
transport_controller_->SignalConnectionState.connect(
this, &WebRtcSession::OnTransportControllerConnectionState);
@@ -1110,12 +1110,12 @@ bool WebRtcSession::ProcessIceMessage(const IceCandidateInterface* candidate) {
}
if (!candidate) {
- LOG(LS_ERROR) << "ProcessIceMessage: Candidate is NULL.";
+ LOG(LS_ERROR) << "ProcessIceMessage: Candidate is null.";
return false;
}
bool valid = false;
- bool ready = ReadyToUseRemoteCandidate(candidate, NULL, &valid);
+ bool ready = ReadyToUseRemoteCandidate(candidate, nullptr, &valid);
if (!valid) {
return false;
}
@@ -1230,7 +1230,7 @@ bool WebRtcSession::SendData(const cricket::SendDataParams& params,
cricket::SendDataResult* result) {
if (!rtp_data_channel_ && !sctp_transport_) {
LOG(LS_ERROR) << "SendData called when rtp_data_channel_ "
- << "and sctp_transport_ are NULL.";
+ << "and sctp_transport_ are null.";
return false;
}
return rtp_data_channel_
@@ -1267,7 +1267,7 @@ bool WebRtcSession::ConnectDataChannel(DataChannel* webrtc_data_channel) {
void WebRtcSession::DisconnectDataChannel(DataChannel* webrtc_data_channel) {
if (!rtp_data_channel_ && !sctp_transport_) {
LOG(LS_ERROR) << "DisconnectDataChannel called when rtp_data_channel_ and "
- "sctp_transport_ are NULL.";
+ "sctp_transport_ are null.";
return;
}
if (rtp_data_channel_) {
@@ -1282,7 +1282,7 @@ void WebRtcSession::DisconnectDataChannel(DataChannel* webrtc_data_channel) {
void WebRtcSession::AddSctpDataStream(int sid) {
if (!sctp_transport_) {
- LOG(LS_ERROR) << "AddSctpDataStream called when sctp_transport_ is NULL.";
+ LOG(LS_ERROR) << "AddSctpDataStream called when sctp_transport_ is null.";
return;
}
network_thread_->Invoke<void>(
@@ -1293,7 +1293,7 @@ void WebRtcSession::AddSctpDataStream(int sid) {
void WebRtcSession::RemoveSctpDataStream(int sid) {
if (!sctp_transport_) {
LOG(LS_ERROR) << "RemoveSctpDataStream called when sctp_transport_ is "
- << "NULL.";
+ << "null.";
return;
}
network_thread_->Invoke<void>(
@@ -1997,13 +1997,13 @@ bool WebRtcSession::ValidateBundleSettings(const SessionDescription* desc) {
const cricket::ContentGroup* bundle_group =
desc->GetGroupByName(cricket::GROUP_TYPE_BUNDLE);
- RTC_DCHECK(bundle_group != NULL);
+ RTC_DCHECK(bundle_group != nullptr);
const cricket::ContentInfos& contents = desc->contents();
for (cricket::ContentInfos::const_iterator citer = contents.begin();
citer != contents.end(); ++citer) {
const cricket::ContentInfo* content = (&*citer);
- RTC_DCHECK(content != NULL);
+ RTC_DCHECK(content != nullptr);
if (bundle_group->HasContentName(content->name) &&
!content->rejected && content->type == cricket::NS_JINGLE_RTP) {
if (!HasRtcpMuxEnabled(content))
@@ -2198,7 +2198,7 @@ void WebRtcSession::ReportTransportStats() {
// for IPv4 and IPv6.
void WebRtcSession::ReportBestConnectionState(
const cricket::TransportStats& stats) {
- RTC_DCHECK(metrics_observer_ != NULL);
+ RTC_DCHECK(metrics_observer_ != nullptr);
for (cricket::TransportChannelStatsList::const_iterator it =
stats.channel_stats.begin();
it != stats.channel_stats.end(); ++it) {
@@ -2248,7 +2248,7 @@ void WebRtcSession::ReportBestConnectionState(
void WebRtcSession::ReportNegotiatedCiphers(
const cricket::TransportStats& stats) {
- RTC_DCHECK(metrics_observer_ != NULL);
+ RTC_DCHECK(metrics_observer_ != nullptr);
if (!dtls_enabled_ || stats.channel_stats.empty()) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698