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

Unified Diff: webrtc/p2p/base/basicpacketsocketfactory.cc

Issue 2620303003: Replace ASSERT by RTC_DCHECK in all non-test code. (Closed)
Patch Set: Address final nits. Created 3 years, 11 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/p2p/base/asyncstuntcpsocket.cc ('k') | webrtc/p2p/base/candidate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/basicpacketsocketfactory.cc
diff --git a/webrtc/p2p/base/basicpacketsocketfactory.cc b/webrtc/p2p/base/basicpacketsocketfactory.cc
index b794904411fab6cb3ef6a7a01e2e004b785d2480..c478d6311202108bbaff642768508171aa1f9f06 100644
--- a/webrtc/p2p/base/basicpacketsocketfactory.cc
+++ b/webrtc/p2p/base/basicpacketsocketfactory.cc
@@ -16,6 +16,7 @@
#include "webrtc/p2p/base/stun.h"
#include "webrtc/base/asynctcpsocket.h"
#include "webrtc/base/asyncudpsocket.h"
+#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/nethelpers.h"
#include "webrtc/base/physicalsocketserver.h"
@@ -89,7 +90,7 @@ AsyncPacketSocket* BasicPacketSocketFactory::CreateServerTcpSocket(
// If using fake TLS, wrap the TCP socket in a pseudo-SSL socket.
if (opts & PacketSocketFactory::OPT_TLS_FAKE) {
- ASSERT(!(opts & PacketSocketFactory::OPT_TLS));
+ RTC_DCHECK(!(opts & PacketSocketFactory::OPT_TLS));
socket = new AsyncSSLSocket(socket);
}
@@ -133,7 +134,7 @@ AsyncPacketSocket* BasicPacketSocketFactory::CreateClientTcpSocket(
int tlsOpts =
opts & (PacketSocketFactory::OPT_TLS | PacketSocketFactory::OPT_TLS_FAKE |
PacketSocketFactory::OPT_TLS_INSECURE);
- ASSERT((tlsOpts & (tlsOpts - 1)) == 0);
+ RTC_DCHECK((tlsOpts & (tlsOpts - 1)) == 0);
if ((tlsOpts & PacketSocketFactory::OPT_TLS) ||
(tlsOpts & PacketSocketFactory::OPT_TLS_INSECURE)) {
@@ -204,7 +205,7 @@ int BasicPacketSocketFactory::BindSocket(AsyncSocket* socket,
SocketFactory* BasicPacketSocketFactory::socket_factory() {
if (thread_) {
- ASSERT(thread_ == Thread::Current());
+ RTC_DCHECK(thread_ == Thread::Current());
return thread_->socketserver();
} else {
return socket_factory_;
« no previous file with comments | « webrtc/p2p/base/asyncstuntcpsocket.cc ('k') | webrtc/p2p/base/candidate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698