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

Unified Diff: net/base/net_util_win.cc

Issue 4268: IsStringUTF8 unittest and enforcing UTF-8 in JSON deserialization (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 | « net/base/net_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util_win.cc
===================================================================
--- net/base/net_util_win.cc (revision 2506)
+++ net/base/net_util_win.cc (working copy)
@@ -44,7 +44,7 @@
path = UnescapeURLComponent(path,
UnescapeRule::SPACES | UnescapeRule::URL_SPECIAL_CHARS);
- if (!IsStringUTF8(path.c_str())) {
+ if (!IsStringUTF8(path)) {
// Not UTF-8, assume encoding is native codepage and we're done. We know we
// are giving the conversion function a nonempty string, and it may fail if
// the given string is not in the current encoding and give us an empty
@@ -68,7 +68,7 @@
NOTREACHED() << "Should have filtered out non-8-bit strings above.";
return false;
}
- if (IsStringUTF8(narrow.c_str())) {
+ if (IsStringUTF8(narrow)) {
// Our string actually looks like it could be UTF-8, convert to 8-bit
// UTF-8 and then to the corresponding wide string.
*file_path = UTF8ToWide(narrow);
« no previous file with comments | « net/base/net_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698