summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-20 22:44:02 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-20 22:44:02 +0000
commitad9d93eaa752230aa64074101456ecb846706e5d (patch)
tree54b388b354d3b8892cfbe727b70315691af48663 /base
parentd54be23ab7555175fc32ac143aae81e758b9d3e0 (diff)
downloadchromium_src-ad9d93eaa752230aa64074101456ecb846706e5d.zip
chromium_src-ad9d93eaa752230aa64074101456ecb846706e5d.tar.gz
chromium_src-ad9d93eaa752230aa64074101456ecb846706e5d.tar.bz2
Print more info in IsStringASCII assertions.
This will help debugging when you have only the logs. TEST=none BUG=none Review URL: http://codereview.chromium.org/174110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23900 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/string_util.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/base/string_util.cc b/base/string_util.cc
index b456376..f58f105 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());
}