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

Unified Diff: webrtc/base/stringencode.cc

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 3 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/base/stringencode.h ('k') | webrtc/base/stringutils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/stringencode.cc
diff --git a/webrtc/base/stringencode.cc b/webrtc/base/stringencode.cc
index c48c52634c98e1a427b42640810fd4f46f2b6864..2930e5776c9015b1a70a5ef7246182e77f03a95d 100644
--- a/webrtc/base/stringencode.cc
+++ b/webrtc/base/stringencode.cc
@@ -26,7 +26,7 @@ namespace rtc {
size_t escape(char * buffer, size_t buflen,
const char * source, size_t srclen,
const char * illegal, char escape) {
- DCHECK(buffer); // TODO: estimate output size
+ RTC_DCHECK(buffer); // TODO(grunell): estimate output size
if (buflen <= 0)
return 0;
@@ -48,7 +48,7 @@ size_t escape(char * buffer, size_t buflen,
size_t unescape(char * buffer, size_t buflen,
const char * source, size_t srclen,
char escape) {
- DCHECK(buffer); // TODO: estimate output size
+ RTC_DCHECK(buffer); // TODO(grunell): estimate output size
if (buflen <= 0)
return 0;
@@ -67,7 +67,7 @@ size_t unescape(char * buffer, size_t buflen,
size_t encode(char * buffer, size_t buflen,
const char * source, size_t srclen,
const char * illegal, char escape) {
- DCHECK(buffer); // TODO: estimate output size
+ RTC_DCHECK(buffer); // TODO(grunell): estimate output size
if (buflen <= 0)
return 0;
@@ -119,8 +119,8 @@ const char* unsafe_filename_characters() {
#if defined(WEBRTC_WIN)
return "\\/:*?\"<>|";
#else // !WEBRTC_WIN
- // TODO
- DCHECK(false);
+ // TODO(grunell): Should this never be reached?
+ RTC_DCHECK(false);
return "";
#endif // !WEBRTC_WIN
}
@@ -257,7 +257,7 @@ size_t utf8_encode(char* buffer, size_t buflen, unsigned long value) {
size_t html_encode(char * buffer, size_t buflen,
const char * source, size_t srclen) {
- DCHECK(buffer); // TODO: estimate output size
+ RTC_DCHECK(buffer); // TODO(grunell): estimate output size
if (buflen <= 0)
return 0;
@@ -275,7 +275,7 @@ size_t html_encode(char * buffer, size_t buflen,
case '\'': escseq = "&#39;"; esclen = 5; break;
case '\"': escseq = "&quot;"; esclen = 6; break;
case '&': escseq = "&amp;"; esclen = 5; break;
- default: DCHECK(false);
+ default: RTC_DCHECK(false);
}
if (bufpos + esclen >= buflen) {
break;
@@ -310,13 +310,13 @@ size_t html_encode(char * buffer, size_t buflen,
size_t html_decode(char * buffer, size_t buflen,
const char * source, size_t srclen) {
- DCHECK(buffer); // TODO: estimate output size
+ RTC_DCHECK(buffer); // TODO(grunell): estimate output size
return xml_decode(buffer, buflen, source, srclen);
}
size_t xml_encode(char * buffer, size_t buflen,
const char * source, size_t srclen) {
- DCHECK(buffer); // TODO: estimate output size
+ RTC_DCHECK(buffer); // TODO(grunell): estimate output size
if (buflen <= 0)
return 0;
@@ -332,7 +332,7 @@ size_t xml_encode(char * buffer, size_t buflen,
case '\'': escseq = "&apos;"; esclen = 6; break;
case '\"': escseq = "&quot;"; esclen = 6; break;
case '&': escseq = "&amp;"; esclen = 5; break;
- default: DCHECK(false);
+ default: RTC_DCHECK(false);
}
if (bufpos + esclen >= buflen) {
break;
@@ -349,7 +349,7 @@ size_t xml_encode(char * buffer, size_t buflen,
size_t xml_decode(char * buffer, size_t buflen,
const char * source, size_t srclen) {
- DCHECK(buffer); // TODO: estimate output size
+ RTC_DCHECK(buffer); // TODO(grunell): estimate output size
if (buflen <= 0)
return 0;
@@ -385,7 +385,7 @@ size_t xml_decode(char * buffer, size_t buflen,
srcpos += 1;
}
char * ptr;
- // TODO: Fix hack (ptr may go past end of data)
+ // TODO(grunell): Fix hack (ptr may go past end of data)
unsigned long val = strtoul(source + srcpos + 1, &ptr, int_base);
if ((static_cast<size_t>(ptr - source) < srclen) && (*ptr == ';')) {
srcpos = ptr - source + 1;
@@ -411,7 +411,7 @@ size_t xml_decode(char * buffer, size_t buflen,
static const char HEX[] = "0123456789abcdef";
char hex_encode(unsigned char val) {
- DCHECK_LT(val, 16);
+ RTC_DCHECK_LT(val, 16);
return (val < 16) ? HEX[val] : '!';
}
@@ -436,7 +436,7 @@ size_t hex_encode(char* buffer, size_t buflen,
size_t hex_encode_with_delimiter(char* buffer, size_t buflen,
const char* csource, size_t srclen,
char delimiter) {
- DCHECK(buffer); // TODO: estimate output size
+ RTC_DCHECK(buffer); // TODO(grunell): estimate output size
if (buflen == 0)
return 0;
@@ -480,7 +480,7 @@ std::string hex_encode_with_delimiter(const char* source, size_t srclen,
char* buffer = STACK_ARRAY(char, kBufferSize);
size_t length = hex_encode_with_delimiter(buffer, kBufferSize,
source, srclen, delimiter);
- DCHECK(srclen == 0 || length > 0);
+ RTC_DCHECK(srclen == 0 || length > 0);
return std::string(buffer, length);
}
@@ -492,7 +492,7 @@ size_t hex_decode(char * cbuffer, size_t buflen,
size_t hex_decode_with_delimiter(char* cbuffer, size_t buflen,
const char* source, size_t srclen,
char delimiter) {
- DCHECK(cbuffer); // TODO: estimate output size
+ RTC_DCHECK(cbuffer); // TODO(grunell): estimate output size
if (buflen == 0)
return 0;
@@ -556,7 +556,7 @@ std::string s_transform(const std::string& source, Transform t) {
size_t tokenize(const std::string& source, char delimiter,
std::vector<std::string>* fields) {
- DCHECK(fields);
+ RTC_DCHECK(fields);
fields->clear();
size_t last = 0;
for (size_t i = 0; i < source.length(); ++i) {
@@ -634,7 +634,7 @@ bool tokenize_first(const std::string& source,
size_t split(const std::string& source, char delimiter,
std::vector<std::string>* fields) {
- DCHECK(fields);
+ RTC_DCHECK(fields);
fields->clear();
size_t last = 0;
for (size_t i = 0; i < source.length(); ++i) {
« no previous file with comments | « webrtc/base/stringencode.h ('k') | webrtc/base/stringutils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698