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

Unified Diff: net/proxy/proxy_script_fetcher_impl.cc

Issue 266053002: Implement alternative string conversion functions in net/ on Android, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove GN changes Created 6 years, 7 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/net.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_script_fetcher_impl.cc
diff --git a/net/proxy/proxy_script_fetcher_impl.cc b/net/proxy/proxy_script_fetcher_impl.cc
index 0887d8c362b78942aa6744463291f418f31528dd..737c6f8450f5456e42e52612ac0ff3eb194c8a93 100644
--- a/net/proxy/proxy_script_fetcher_impl.cc
+++ b/net/proxy/proxy_script_fetcher_impl.cc
@@ -5,7 +5,6 @@
#include "net/proxy/proxy_script_fetcher_impl.h"
#include "base/compiler_specific.h"
-#include "base/i18n/icu_string_conversions.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string_util.h"
@@ -13,6 +12,7 @@
#include "net/base/io_buffer.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
+#include "net/base/net_string_util.h"
#include "net/base/request_priority.h"
#include "net/cert/cert_status_flags.h"
#include "net/http/http_response_headers.h"
@@ -56,18 +56,15 @@ void ConvertResponseToUTF16(const std::string& charset,
if (charset.empty()) {
// Assume ISO-8859-1 if no charset was specified.
- codepage = base::kCodepageLatin1;
+ codepage = kCharsetLatin1;
} else {
// Otherwise trust the charset that was provided.
codepage = charset.c_str();
}
- // We will be generous in the conversion -- if any characters lie
- // outside of |charset| (i.e. invalid), then substitute them with
- // U+FFFD rather than failing.
- base::CodepageToUTF16(bytes, codepage,
- base::OnStringConversionError::SUBSTITUTE,
- utf16);
+ // Be generous in the conversion -- if any characters lie outside of |charset|
+ // (i.e. invalid), then substitute them with U+FFFD rather than failing.
+ ConvertToUTF16WithSubstitutions(bytes, codepage, utf16);
}
} // namespace
« no previous file with comments | « net/net.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698