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

Unified Diff: net/base/net_string_util.h

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/android/net_jni_registrar.cc ('k') | net/base/net_string_util_icu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_string_util.h
diff --git a/net/base/net_string_util.h b/net/base/net_string_util.h
index ce5fdf5119fc1ebb5af59d11a734f2fc1ec6b303..8e959a02f5efd61a03dcfb0acbc2a11f68f1e87f 100644
--- a/net/base/net_string_util.h
+++ b/net/base/net_string_util.h
@@ -14,6 +14,8 @@
namespace net {
+extern const char* const kCharsetLatin1;
+
// Converts |text| using |charset| to UTF-8, and writes it to |output|.
// On failure, returns false and |output| is cleared.
bool ConvertToUtf8(const std::string& text, const char* charset,
@@ -24,19 +26,16 @@ bool ConvertToUtf8(const std::string& text, const char* charset,
bool ConvertToUtf8AndNormalize(const std::string& text, const char* charset,
std::string* output);
-// Converts |text| encoded in Latin-1 to UTF-8, normalizes the result, and
-// writes it to |output|. On failure, returns false and |output| is cleared.
-bool ConvertLatin1ToUtf8AndNormalize(const std::string& text,
- std::string* output);
-
// Converts |text| using |charset| to UTF-16, and writes it to |output|.
// On failure, returns false and |output| is cleared.
bool ConvertToUTF16(const std::string& text, const char* charset,
base::string16* output);
-// Converts |text| encoded in Latin-1 to UTF-16, and writes it to |output|.
-// On failure, returns false and |output| is cleared.
-bool ConvertLatin1ToUTF16(const std::string& text, base::string16* output);
+// Converts |text| using |charset| to UTF-16, and writes it to |output|.
+// Any characters that can not be converted are replaced with U+FFFD.
+bool ConvertToUTF16WithSubstitutions(const std::string& text,
+ const char* charset,
+ base::string16* output);
} // namespace net
« no previous file with comments | « net/android/net_jni_registrar.cc ('k') | net/base/net_string_util_icu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698