summaryrefslogtreecommitdiffstats
path: root/net/base/net_util.cc
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-07 15:29:49 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-07 15:29:49 +0000
commit6b27db809e959efaf7183ea2de64c6ab3947ef3d (patch)
treeed2ed10f826f6eb40884231ee0c98d86afef44a7 /net/base/net_util.cc
parent65b1094478e054ef1f924d3681f8d34ec88d9fcf (diff)
downloadchromium_src-6b27db809e959efaf7183ea2de64c6ab3947ef3d.zip
chromium_src-6b27db809e959efaf7183ea2de64c6ab3947ef3d.tar.gz
chromium_src-6b27db809e959efaf7183ea2de64c6ab3947ef3d.tar.bz2
Remove the old NativeMB functions from string util, and use the new ones in sys_strings.h. I also removed duplicated code from the sandbox that can now use this, and fixed one case in the bug reporter that should not have been using the native multibyte encoding.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@515 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_util.cc')
-rw-r--r--net/base/net_util.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index e339838..d8d0949 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -46,6 +46,7 @@
#include "base/scoped_ptr.h"
#include "base/string_tokenizer.h"
#include "base/string_util.h"
+#include "base/sys_string_conversions.h"
#include "base/time.h"
#include "base/string_escape.h"
#include "googleurl/src/gurl.h"
@@ -260,7 +261,7 @@ bool DecodeWord(const std::string& encoded_word,
if (IsStringUTF8(encoded_word.c_str())) {
*output = encoded_word;
} else {
- *output = WideToUTF8(NativeMBToWide(encoded_word));
+ *output = WideToUTF8(base::SysNativeMBToWide(encoded_word));
}
*is_rfc2047 = false;
return true;
@@ -722,7 +723,7 @@ bool FileURLToFilePath(const GURL& url, std::wstring* file_path) {
// 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
// string back. We detect this and report failure.
- *file_path = NativeMBToWide(path);
+ *file_path = base::SysNativeMBToWide(path);
return !file_path->empty();
}
file_path->assign(UTF8ToWide(path));
@@ -748,7 +749,7 @@ bool FileURLToFilePath(const GURL& url, std::wstring* file_path) {
} else {
// Our wide string contains only 8-bit characters and it's not UTF-8, so
// we assume it's in the native codepage.
- *file_path = NativeMBToWide(narrow);
+ *file_path = base::SysNativeMBToWide(narrow);
}
// Fail if 8-bit -> wide conversion failed and gave us an empty string back