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

Unified Diff: base/string_util.cc

Issue 174110: Print more info in IsStringASCII assertions. (Closed)
Patch Set: Created 11 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_util.cc
diff --git a/base/string_util.cc b/base/string_util.cc
index b456376ee4460d10de3ecfb45fbdbb112a504fa5..f58f105ee1653b6a9ec83948d9243b3073c300bf 100644
--- a/base/string_util.cc
+++ b/base/string_util.cc
@@ -502,22 +502,22 @@ std::string CollapseWhitespaceASCII(const std::string& text,
}
std::string WideToASCII(const std::wstring& wide) {
- DCHECK(IsStringASCII(wide));
+ DCHECK(IsStringASCII(wide)) << wide;
return std::string(wide.begin(), wide.end());
}
std::wstring ASCIIToWide(const StringPiece& ascii) {
- DCHECK(IsStringASCII(ascii));
+ DCHECK(IsStringASCII(ascii)) << ascii;
return std::wstring(ascii.begin(), ascii.end());
}
std::string UTF16ToASCII(const string16& utf16) {
- DCHECK(IsStringASCII(utf16));
+ DCHECK(IsStringASCII(utf16)) << utf16;
return std::string(utf16.begin(), utf16.end());
}
string16 ASCIIToUTF16(const StringPiece& ascii) {
- DCHECK(IsStringASCII(ascii));
+ DCHECK(IsStringASCII(ascii)) << ascii;
return string16(ascii.begin(), ascii.end());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698