Index: net/base/net_util.cc |
=================================================================== |
--- net/base/net_util.cc (revision 107404) |
+++ net/base/net_util.cc (working copy) |
@@ -209,8 +209,11 @@ |
} |
enum RFC2047EncodingType {Q_ENCODING, B_ENCODING}; |
-bool DecodeBQEncoding(const std::string& part, RFC2047EncodingType enc_type, |
- const std::string& charset, std::string* output) { |
+bool DecodeBQEncoding(const std::string& part, |
+ RFC2047EncodingType enc_type, |
+ const std::string& charset, |
+ std::string* output) { |
+ DCHECK(!part.empty()); // TODO(pkasting): Not sure about this. |
std::string decoded; |
if (enc_type == B_ENCODING) { |
if (!base::Base64Decode(part, &decoded)) { |
@@ -221,6 +224,7 @@ |
return false; |
} |
} |
+ DCHECK(!decoded.empty()); |
UErrorCode err = U_ZERO_ERROR; |
UConverter* converter(ucnv_open(charset.c_str(), &err)); |