Replace the easy cases of VERIFY usage.

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2652653012
Cr-Commit-Position: refs/heads/master@{#16370}
diff --git a/webrtc/base/fakesslidentity.h b/webrtc/base/fakesslidentity.h
index 3b0df29..7065fc0 100644
--- a/webrtc/base/fakesslidentity.h
+++ b/webrtc/base/fakesslidentity.h
@@ -15,7 +15,7 @@
 #include <memory>
 #include <vector>
 
-#include "webrtc/base/common.h"
+#include "webrtc/base/checks.h"
 #include "webrtc/base/messagedigest.h"
 #include "webrtc/base/sslidentity.h"
 
@@ -45,7 +45,7 @@
   }
   void ToDER(Buffer* der_buffer) const override {
     std::string der_string;
-    VERIFY(SSLIdentity::PemToDer(kPemTypeCertificate, data_, &der_string));
+    RTC_CHECK(SSLIdentity::PemToDer(kPemTypeCertificate, data_, &der_string));
     der_buffer->SetData(der_string.c_str(), der_string.size());
   }
   int64_t CertificateExpirationTime() const override {
diff --git a/webrtc/base/messagequeue.cc b/webrtc/base/messagequeue.cc
index 503e8fe..8dd84cb 100644
--- a/webrtc/base/messagequeue.cc
+++ b/webrtc/base/messagequeue.cc
@@ -453,7 +453,8 @@
     // If this message queue processes 1 message every millisecond for 50 days,
     // we will wrap this number.  Even then, only messages with identical times
     // will be misordered, and then only briefly.  This is probably ok.
-    VERIFY(0 != ++dmsgq_next_num_);
+    ++dmsgq_next_num_;
+    RTC_DCHECK_NE(0, dmsgq_next_num_);
   }
   WakeUpSocketServer();
 }
diff --git a/webrtc/pc/channel.cc b/webrtc/pc/channel.cc
index a03b46d..65b0585 100644
--- a/webrtc/pc/channel.cc
+++ b/webrtc/pc/channel.cc
@@ -1307,8 +1307,8 @@
 bool BaseChannel::UpdateLocalStreams_w(const std::vector<StreamParams>& streams,
                                        ContentAction action,
                                        std::string* error_desc) {
-  if (!VERIFY(action == CA_OFFER || action == CA_ANSWER ||
-              action == CA_PRANSWER || action == CA_UPDATE))
+  if (!(action == CA_OFFER || action == CA_ANSWER ||
+        action == CA_PRANSWER || action == CA_UPDATE))
     return false;
 
   // If this is an update, streams only contain streams that have changed.
@@ -1380,8 +1380,8 @@
     const std::vector<StreamParams>& streams,
     ContentAction action,
     std::string* error_desc) {
-  if (!VERIFY(action == CA_OFFER || action == CA_ANSWER ||
-              action == CA_PRANSWER || action == CA_UPDATE))
+  if (!(action == CA_OFFER || action == CA_ANSWER ||
+        action == CA_PRANSWER || action == CA_UPDATE))
     return false;
 
   // If this is an update, streams only contain streams that have changed.
diff --git a/webrtc/pc/peerconnection.cc b/webrtc/pc/peerconnection.cc
index cbd0d4b..14e1809 100644
--- a/webrtc/pc/peerconnection.cc
+++ b/webrtc/pc/peerconnection.cc
@@ -1014,7 +1014,7 @@
                               StatsOutputLevel level) {
   TRACE_EVENT0("webrtc", "PeerConnection::GetStats");
   RTC_DCHECK(signaling_thread()->IsCurrent());
-  if (!VERIFY(observer != NULL)) {
+  if (!observer) {
     LOG(LS_ERROR) << "GetStats - observer is NULL.";
     return false;
   }
@@ -1097,7 +1097,7 @@
 void PeerConnection::CreateOffer(CreateSessionDescriptionObserver* observer,
                                  const MediaConstraintsInterface* constraints) {
   TRACE_EVENT0("webrtc", "PeerConnection::CreateOffer");
-  if (!VERIFY(observer != nullptr)) {
+  if (!observer) {
     LOG(LS_ERROR) << "CreateOffer - observer is NULL.";
     return;
   }
@@ -1149,7 +1149,7 @@
 void PeerConnection::CreateOffer(CreateSessionDescriptionObserver* observer,
                                  const RTCOfferAnswerOptions& options) {
   TRACE_EVENT0("webrtc", "PeerConnection::CreateOffer");
-  if (!VERIFY(observer != nullptr)) {
+  if (!observer) {
     LOG(LS_ERROR) << "CreateOffer - observer is NULL.";
     return;
   }
@@ -1169,7 +1169,7 @@
     CreateSessionDescriptionObserver* observer,
     const MediaConstraintsInterface* constraints) {
   TRACE_EVENT0("webrtc", "PeerConnection::CreateAnswer");
-  if (!VERIFY(observer != nullptr)) {
+  if (!observer) {
     LOG(LS_ERROR) << "CreateAnswer - observer is NULL.";
     return;
   }
@@ -1188,7 +1188,7 @@
 void PeerConnection::CreateAnswer(CreateSessionDescriptionObserver* observer,
                                   const RTCOfferAnswerOptions& options) {
   TRACE_EVENT0("webrtc", "PeerConnection::CreateAnswer");
-  if (!VERIFY(observer != nullptr)) {
+  if (!observer) {
     LOG(LS_ERROR) << "CreateAnswer - observer is NULL.";
     return;
   }
@@ -1211,7 +1211,7 @@
   if (IsClosed()) {
     return;
   }
-  if (!VERIFY(observer != nullptr)) {
+  if (!observer) {
     LOG(LS_ERROR) << "SetLocalDescription - observer is NULL.";
     return;
   }
@@ -1293,7 +1293,7 @@
   if (IsClosed()) {
     return;
   }
-  if (!VERIFY(observer != nullptr)) {
+  if (!observer) {
     LOG(LS_ERROR) << "SetRemoteDescription - observer is NULL.";
     return;
   }
@@ -2190,7 +2190,8 @@
     // track label is the same as |streamid|.
     const std::string& channel_label = params.sync_label;
     auto data_channel_it = rtp_data_channels_.find(channel_label);
-    if (!VERIFY(data_channel_it != rtp_data_channels_.end())) {
+    if (data_channel_it == rtp_data_channels_.end()) {
+      LOG(LS_ERROR) << "channel label not found";
       continue;
     }
     // Set the SSRC the data channel should use for sending.
diff --git a/webrtc/pc/webrtcsession.cc b/webrtc/pc/webrtcsession.cc
index def02d4..cfcc487 100644
--- a/webrtc/pc/webrtcsession.cc
+++ b/webrtc/pc/webrtcsession.cc
@@ -1274,9 +1274,9 @@
     return false;
   }
   uint32_t send_ssrc = 0;
-  if (!VERIFY(local_description() &&
-              GetAudioSsrcByTrackId(local_description()->description(),
-                                    track_id, &send_ssrc))) {
+  if (!(local_description() &&
+        GetAudioSsrcByTrackId(local_description()->description(),
+                              track_id, &send_ssrc))) {
     LOG(LS_ERROR) << "InsertDtmf: Track does not exist: " << track_id;
     return false;
   }